Function at 0x40c910
Capabilities:
Read file on windows

Disassembly:
push ebp
mov eax, 0x230c
mov ebp, esp
push edi
push esi
push ebx
call fcn.005d34c0
sub esp, eax
test byte [0x8511c1], 1
je 0x40c940
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
lea eax, [ebp - 0x222e]
mov ebx, ecx
mov ecx, dword [ecx + 0x14]
mov esi, dword [ebp + 8]
lea edx, [ebp - 0x2240]
xor edi, edi
mov dword [ebp - 0x2238], eax
lea eax, [ebp - 0x211a]
mov dword [ebp - 0x223c], 0
mov dword [ebp - 0x2234], pe_nt_image_headers32
mov byte [ebp - 0x2230], 0
mov dword [ebp - 0x2124], eax
xor eax, eax
mov dword [ebp - method.g.virtual_0], vtable.g.0
mov word [ebp - 0x211a], ax
mov eax, dword [ebp + 8]
mov word [ebp - 0x222e], di
mov dword [ebp - 0x2128], 0
mov dword [ebp - 0x2120], pe_nt_image_headers32
mov byte [ebp - 0x211c], 0
mov eax, dword [eax + 0x828]
mov dword [ebp - method.g.virtual_0], vtable.g.0
add ecx, eax
mov dword [esp + 0xc], ecx
add eax, dword [esi + 0x138]
mov dword [esp + 4], 0x71a2a4
mov dword [esp], edx
mov dword [esp + 8], eax
call fcn.00403910
mov esi, dword [ebp + 8]
mov eax, dword [ebx + 0x10]
add eax, dword [esi + 0x828]
mov dword [esp + 4], 0x71a2a4
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x2238]
mov dword [esp + 8], eax
lea eax, [ebp - 0x212c]
mov dword [esp], eax
call fcn.00403910
mov edi, dword [ebp - 0x2124]
lea eax, [ebp - 0x22ac]
mov dword [ebp - 0x22b4], eax
test edi, edi
je 0x40cfe0
mov dword [esp], edi
call sub.msvcrt.dll_wcslen
lea esi, [eax + eax]
mov edx, esi
sar edx, 1
cmp edx, 7
mov dword [ebp - 0x22c4], edx
ja 0x40cb60
cmp edx, 1
mov eax, dword [ebp - 0x22b4]
je 0x40cb50
test edx, edx
jne 0x40cb91
lea ecx, [edx + edx]
xor esi, esi
lea edi, [ebp - 0x22b4]
mov dword [ebp - 0x22b0], edx
mov word [eax + edx*2], si
mov dword [esp + 4], ecx
mov dword [esp + 8], 0xc70f6907
mov dword [esp], eax
mov esi, dword [ebp + 8]
call fcn.006d7630
mov dword [esp + 4], edi
mov edi, dword [ebp + 8]
xor edx, edx
mov dword [esp + 8], eax
add esi, 0x834
mov ecx, esi
div dword [edi + 0x838]
mov dword [esp], edx
call fcn.0063f6a0
sub esp, 0xc
test eax, eax
je 0x40cbb2
mov edi, dword [eax]
test edi, edi
je 0x40cbb2
mov eax, dword [ebp - 0x22b4]
lea esi, [ebp - 0x22ac]
cmp eax, esi
je 0x40cae6
mov dword [esp], eax
call fcn.006e9880
mov eax, dword [edi + 0x20]
mov dword [ebx + 0x44], eax
mov eax, dword [edi + 0x1c]
mov dword [ebx + 0x40], eax
mov eax, dword [edi + 0x28]
mov dword [ebx + 0x20], eax
mov eax, dword [edi + 0x24]
mov ebx, dword [ebp + 0x10]
mov dword [ebx], eax
mov eax, dword [ebp - 0x2128]
mov dword [ebp - method.nInst.virtual_0], vtable.nInst.0
test eax, eax
je 0x40cb1c
mov dword [esp], eax
call fcn.006e9860
mov eax, dword [ebp - 0x223c]
mov dword [ebp - method.nInst.virtual_0], vtable.nInst.0
test eax, eax
je 0x40c934
mov dword [esp], eax
call fcn.006e9860
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
movzx ecx, word [edi]
mov word [eax], cx
jmp 0x40ca6a
lea eax, [ebp - 0x22c4]
lea ecx, [ebp - 0x22b4]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.006c0420
mov edx, dword [ebp - 0x22c4]
sub esp, 8
mov dword [ebp - 0x22b4], eax
mov dword [ebp - 0x22ac], edx
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov edx, dword [ebp - 0x22c4]
mov eax, dword [ebp - 0x22b4]
jmp 0x40ca6a
mov eax, dword [ebp - 0x22b4]
lea edi, [ebp - 0x22ac]
cmp eax, edi
je 0x40cbca
mov dword [esp], eax
call fcn.006e9880
mov edi, dword [ebp - 0x2238]
lea eax, [ebp - 0x2264]
mov dword [ebp - 0x226c], eax
test edi, edi
je 0x40d33a
mov dword [esp], edi
call sub.msvcrt.dll_wcslen
add eax, eax
mov edx, eax
mov dword [ebp - 0x22dc], eax
sar edx, 1
cmp edx, 7
mov dword [ebp - 0x22c0], edx
ja 0x40d030
cmp edx, 1
mov eax, dword [ebp - 0x226c]
je 0x40d28b
test edx, edx
jne 0x40d061
lea ecx, [edx + edx]
xor edi, edi
mov dword [ebp - 0x2268], edx
mov word [eax + edx*2], di
lea edi, [ebp - 0x226c]
mov dword [esp + 8], 0xc70f6907
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.006d7630
mov dword [esp + 4], edi
mov edi, dword [ebp + 8]
xor edx, edx
mov dword [esp + 8], eax
mov ecx, esi
div dword [edi + 0x838]
mov dword [esp], edx
call fcn.0063f6a0
sub esp, 0xc
test eax, eax
je 0x40d144
mov edi, dword [eax]
test edi, edi
je 0x40d144
mov eax, dword [ebp - 0x226c]
lea ecx, [ebp - 0x2264]
cmp eax, ecx
je 0x40cc91
mov dword [esp], eax
call fcn.006e9880
mov eax, dword [edi + 0x28]
mov dword [ebx + 0x20], eax
mov eax, dword [edi + 0x1c]
mov dword [ebx + 0x40], eax
mov eax, dword [edi + 0x2c]
mov dword [ebp - 0x22dc], eax
mov eax, dword [ebp + 0x10]
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
mov dword [eax], 0xffffffff
mov eax, dword [ebp + 8]
mov edx, dword [ebx + 0x1c]
mov eax, dword [eax + 0x828]
add edx, eax
mov dword [esp + 0xc], edx
add eax, dword [ebx + 0x18]
mov dword [esp + 4], 0x71a9d6
mov dword [esp + 8], eax
lea eax, [ebp - 0x2018]
mov dword [esp], eax
call edi
mov ecx, dword [ebp + 8]
mov eax, dword [ebx + 0x10]
add eax, dword [ecx + 0x828]
mov dword [esp + 4], 0x71a9dd
mov dword [esp + 8], eax
lea eax, [ebp - 0x1018]
mov dword [esp], eax
call edi
lea eax, [ebx + 0x44]
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0x18], eax
lea eax, [ebx + 0x40]
mov dword [esp + 0x14], eax
lea eax, [ebx + 0x20]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x22dc]
mov dword [esp + 8], eax
lea eax, [ebp - 0x1018]
mov dword [esp + 4], eax
lea eax, [ebp - 0x2018]
mov dword [esp], eax
call fcn.00412d30
mov eax, dword [ebp - 0x2124]
lea edi, [ebp - 0x2294]
sub esp, 0x1c
mov dword [ebp - 0x229c], edi
test eax, eax
mov dword [ebp - 0x22e0], eax
je 0x40d32e
mov dword [esp], eax
call sub.msvcrt.dll_wcslen
add eax, eax
mov edx, eax
mov dword [ebp - 0x22e4], eax
sar edx, 1
cmp edx, 7
mov dword [ebp - 0x22bc], edx
ja 0x40d0e6
cmp edx, 1
mov eax, dword [ebp - 0x229c]
je 0x40d2a7
test edx, edx
jne 0x40d117
xor ecx, ecx
cmp eax, edi
mov word [eax + edx*2], cx
mov ecx, dword [ebx + 0x20]
mov dword [ebp - 0x22e0], ecx
mov ecx, dword [ebp + 0x10]
mov ecx, dword [ecx]
mov dword [ebp - 0x22e4], ecx
mov ecx, dword [ebx + 0x44]
mov dword [ebp - 0x22e8], ecx
mov ecx, dword [ebx + 0x40]
mov dword [ebp - 0x22ec], ecx
lea ecx, [ebp - 0x2264]
mov dword [ebp - 0x226c], ecx
je 0x40d2b8
mov dword [ebp - 0x226c], eax
mov eax, dword [ebp - 0x2294]
mov dword [ebp - 0x2264], eax
xor eax, eax
mov byte [esp + 8], 0
mov ecx, esi
mov word [ebp - 0x2294], ax
mov eax, dword [ebp - 0x22ec]
mov dword [ebp - 0x2268], edx
mov dword [ebp - 0x229c], edi
mov dword [ebp - 0x2298], 0
mov dword [ebp - 0x22cc], esi
mov dword [ebp - 0x2254], eax
mov eax, dword [ebp - 0x22e8]
mov dword [ebp - 0x2250], eax
mov eax, dword [ebp - 0x22e4]
mov dword [ebp - 0x224c], eax
mov eax, dword [ebp - 0x22e0]
mov dword [ebp - 0x2248], eax
mov eax, dword [ebp - 0x22dc]
mov dword [ebp - 0x2244], eax
lea eax, [ebp - 0x22cc]
mov dword [esp + 4], eax
lea eax, [ebp - 0x226c]
mov dword [esp], eax
call fcn.00685be0
mov eax, dword [ebp - 0x226c]
lea ecx, [ebp - 0x2264]
sub esp, 0xc
cmp eax, ecx
je 0x40ce8f
mov dword [esp], eax
call fcn.006e9880
mov eax, dword [ebp - 0x229c]
cmp eax, edi
je 0x40cea1
mov dword [esp], eax
call fcn.006e9880
mov eax, dword [ebp - 0x2238]
lea edi, [ebp - 0x227c]
mov dword [ebp - 0x2284], edi
test eax, eax
mov dword [ebp - 0x22e0], eax
je 0x40d322
mov dword [esp], eax
call sub.msvcrt.dll_wcslen
add eax, eax
mov edx, eax
mov dword [ebp - 0x22e4], eax
sar edx, 1
cmp edx, 7
mov dword [ebp - 0x22b8], edx
ja 0x40d088
cmp edx, 1
mov eax, dword [ebp - 0x2284]
je 0x40d296
test edx, edx
jne 0x40d0b9
xor ecx, ecx
cmp eax, edi
mov word [eax + edx*2], cx
mov ecx, dword [ebx + 0x20]
mov ebx, dword [ebx + 0x40]
mov dword [ebp - 0x22e0], ecx
lea ecx, [ebp - 0x2264]
mov dword [ebp - 0x226c], ecx
je 0x40d2ed
mov dword [ebp - 0x226c], eax
mov eax, dword [ebp - 0x227c]
mov dword [ebp - 0x2264], eax
xor eax, eax
mov byte [esp + 8], 0
mov ecx, esi
mov word [ebp - 0x227c], ax
mov eax, dword [ebp - 0x22e0]
mov dword [ebp - 0x2268], edx
mov dword [ebp - 0x2284], edi
mov dword [ebp - 0x2280], 0
mov dword [ebp - 0x2254], ebx
mov dword [ebp - 0x2248], eax
mov eax, dword [ebp - 0x22dc]
mov dword [ebp - 0x2250], 0
mov dword [ebp - 0x224c], 0
mov dword [ebp - 0x22c8], esi
mov dword [ebp - 0x2244], eax
lea eax, [ebp - 0x22c8]
mov dword [esp + 4], eax
lea eax, [ebp - 0x226c]
mov dword [esp], eax
call fcn.00685be0
mov eax, dword [ebp - 0x226c]
lea ebx, [ebp - 0x2264]
sub esp, 0xc
cmp eax, ebx
je 0x40cfc4
mov dword [esp], eax
call fcn.006e9880
mov eax, dword [ebp - 0x2284]
cmp eax, edi
je 0x40cb00
mov dword [esp], eax
call fcn.006e9880
jmp 0x40cb00
mov dword [esp], 0x71a990
call fcn.006de350
mov ebx, eax
mov eax, dword [ebp - 0x2128]
mov dword [ebp - method.nInst.virtual_0], vtable.nInst.0
test eax, eax
je 0x40d00a
mov dword [esp], eax
call fcn.006e9860
mov eax, dword [ebp - 0x223c]
mov dword [ebp - method.nInst.virtual_0], vtable.nInst.0
test eax, eax
je 0x40d026
mov dword [esp], eax
call fcn.006e9860
mov dword [esp], ebx
call fcn.005d5ce0
nop
lea eax, [ebp - 0x22c0]
lea ecx, [ebp - 0x226c]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.006c0420
mov edx, dword [ebp - 0x22c0]
sub esp, 8
mov dword [ebp - 0x226c], eax
mov dword [ebp - 0x2264], edx
mov ecx, dword [ebp - 0x22dc]
mov dword [esp + 4], edi
mov dword [esp], eax
mov dword [esp + 8], ecx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebp - 0x22c0]
mov eax, dword [ebp - 0x226c]
jmp 0x40cc1e
lea eax, [ebp - 0x22b8]
lea ecx, [ebp - 0x2284]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.006c0420
mov edx, dword [ebp - 0x22b8]
sub esp, 8
mov dword [ebp - 0x2284], eax
mov dword [ebp - 0x227c], edx
mov ecx, dword [ebp - 0x22e4]
mov dword [esp], eax
mov dword [esp + 8], ecx
mov ecx, dword [ebp - 0x22e0]
mov dword [esp + 4], ecx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebp - 0x22b8]
mov eax, dword [ebp - 0x2284]
jmp 0x40cefb
lea eax, [ebp - 0x22bc]
lea ecx, [ebp - 0x229c]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.006c0420
mov edx, dword [ebp - 0x22bc]
sub esp, 8
mov dword [ebp - 0x229c], eax
mov dword [ebp - 0x2294], edx
mov ecx, dword [ebp - 0x22e4]
mov dword [esp], eax
mov dword [esp + 8], ecx
mov ecx, dword [ebp - 0x22e0]
mov dword [esp + 4], ecx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebp - 0x22bc]
mov eax, dword [ebp - 0x229c]
jmp 0x40cda2
mov eax, dword [ebp - 0x226c]
lea edi, [ebp - 0x2264]
cmp eax, edi
je 0x40d15c
mov dword [esp], eax
call fcn.006e9880
mov eax, dword [ebp - 0x2238]
mov dword [esp + 4], 0x71a594
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__wfopen]
test eax, eax
mov edi, eax
je 0x40d355
mov dword [esp + 0xc], 2
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call fcn.005d94b0
mov dword [esp], edi
call fcn.005d9210
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], edi
mov dword [ebp - 0x22dc], eax
call fcn.005d94b0
mov eax, dword [ebp - 0x22dc]
mov dword [esp], eax
call fcn.006e98b0
mov ecx, eax
mov eax, dword [ebp - 0x22dc]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 1
mov dword [esp], ecx
mov dword [ebp - 0x22e0], ecx
mov dword [esp + 4], eax
call sub.msvcrt.dll_fread
mov dword [esp], edi
call sub.msvcrt.dll_fclose
mov edi, dword [ebp - 0x22dc]
test edi, edi
je 0x40d346
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x22e0]
mov eax, dword [eax + 0x6c]
sub eax, dword [edx + 0x68]
sar eax, 2
imul eax, eax, 0xaaaaaaab
mov dword [ebp - 0x22dc], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x828]
mov dword [esp + 0xc], edi
mov dword [esp + 8], ecx
mov edx, dword [ebx + 0x14]
mov edi, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
add edx, eax
mov dword [esp + 4], edx
add eax, dword [edi + 0x138]
mov dword [esp], eax
call fcn.0041ad20
sub esp, 0x10
mov ecx, dword [ebp + 8]
mov dword [esp], ebx
call fcn.0040baa0
mov dword [ebx + 0x20], eax
mov eax, dword [ebp - 0x22e0]
sub esp, 4
mov dword [esp], eax
call fcn.006e9860
jmp 0x40cca6
movzx ecx, word [edi]
mov word [eax], cx
jmp 0x40cc1e
mov ecx, dword [ebp - 0x22e0]
movzx ecx, word [ecx]
mov word [eax], cx
jmp 0x40cefb
mov ecx, dword [ebp - 0x22e0]
movzx ecx, word [ecx]
mov word [eax], cx
jmp 0x40cda2
mov eax, dword [ebp - 0x2294]
mov dword [ebp - 0x2264], eax
mov eax, dword [ebp - 0x2290]
mov dword [ebp - 0x2260], eax
mov eax, dword [ebp - 0x228c]
mov dword [ebp - 0x225c], eax
mov eax, dword [ebp - 0x2288]
mov dword [ebp - 0x2258], eax
jmp 0x40cdf4
mov eax, dword [ebp - 0x227c]
mov dword [ebp - 0x2264], eax
mov eax, dword [ebp - 0x2278]
mov dword [ebp - 0x2260], eax
mov eax, dword [ebp - 0x2274]
mov dword [ebp - 0x225c], eax
mov eax, dword [ebp - 0x2270]
mov dword [ebp - 0x2258], eax
jmp 0x40cf33
mov dword [esp], 0x71a990
call fcn.006de350
mov dword [esp], 0x71a990
call fcn.006de350
mov dword [esp], 0x71a990
call fcn.006de350
mov dword [ebp - 0x22dc], 0
jmp 0x40d267
mov eax, dword [ebp - 0x2238]
mov dword [esp + 4], str.ERROR:_file_not_found__S_n
mov dword [esp], 0x833180
mov dword [esp + 8], eax
call fcn.0041e8c0
jmp 0x40cb00