Function at 0x40c930
Capabilities:
Read file on windows

Disassembly:
push ebp
mov eax, 0x230c
mov ebp, esp
push edi
push esi
push ebx
call fcn.005d4d10
sub esp, eax
test byte [0x8531c1], 1
je 0x40c960
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 - 0x2240], 0x75d6e8
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 - 0x212c], 0x75d6e8
add ecx, eax
mov dword [esp + 0xc], ecx
add eax, dword [esi + 0x138]
mov dword [esp + 4], 0x71b284
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], 0x71b284
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 0x40d000
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 0x40cb80
cmp edx, 1
mov eax, dword [ebp - 0x22b4]
je 0x40cb70
test edx, edx
jne 0x40cbb1
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.006d9050
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.006410c0
sub esp, 0xc
test eax, eax
je 0x40cbd2
mov edi, dword [eax]
test edi, edi
je 0x40cbd2
mov eax, dword [ebp - 0x22b4]
lea esi, [ebp - 0x22ac]
cmp eax, esi
je 0x40cb06
mov dword [esp], eax
call fcn.006eb330
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 0x40cb3c
mov dword [esp], eax
call fcn.006eb310
mov eax, dword [ebp - 0x223c]
mov dword [ebp - method.nInst.virtual_0], vtable.nInst.0
test eax, eax
je 0x40c954
mov dword [esp], eax
call fcn.006eb310
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
movzx ecx, word [edi]
mov word [eax], cx
jmp 0x40ca8a
lea eax, [ebp - 0x22c4]
lea ecx, [ebp - 0x22b4]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.006c1e40
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 0x40ca8a
mov eax, dword [ebp - 0x22b4]
lea edi, [ebp - 0x22ac]
cmp eax, edi
je 0x40cbea
mov dword [esp], eax
call fcn.006eb330
mov edi, dword [ebp - 0x2238]
lea eax, [ebp - 0x2264]
mov dword [ebp - 0x226c], eax
test edi, edi
je 0x40d35a
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 0x40d050
cmp edx, 1
mov eax, dword [ebp - 0x226c]
je 0x40d2ab
test edx, edx
jne 0x40d081
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.006d9050
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.006410c0
sub esp, 0xc
test eax, eax
je 0x40d164
mov edi, dword [eax]
test edi, edi
je 0x40d164
mov eax, dword [ebp - 0x226c]
lea ecx, [ebp - 0x2264]
cmp eax, ecx
je 0x40ccb1
mov dword [esp], eax
call fcn.006eb330
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], 0x71b9da
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], 0x71b9e1
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.00412da0
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 0x40d34e
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 0x40d106
cmp edx, 1
mov eax, dword [ebp - 0x229c]
je 0x40d2c7
test edx, edx
jne 0x40d137
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 0x40d2d8
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.00687600
mov eax, dword [ebp - 0x226c]
lea ecx, [ebp - 0x2264]
sub esp, 0xc
cmp eax, ecx
je 0x40ceaf
mov dword [esp], eax
call fcn.006eb330
mov eax, dword [ebp - 0x229c]
cmp eax, edi
je 0x40cec1
mov dword [esp], eax
call fcn.006eb330
mov eax, dword [ebp - 0x2238]
lea edi, [ebp - 0x227c]
mov dword [ebp - 0x2284], edi
test eax, eax
mov dword [ebp - 0x22e0], eax
je 0x40d342
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 0x40d0a8
cmp edx, 1
mov eax, dword [ebp - 0x2284]
je 0x40d2b6
test edx, edx
jne 0x40d0d9
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 0x40d30d
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.00687600
mov eax, dword [ebp - 0x226c]
lea ebx, [ebp - 0x2264]
sub esp, 0xc
cmp eax, ebx
je 0x40cfe4
mov dword [esp], eax
call fcn.006eb330
mov eax, dword [ebp - 0x2284]
cmp eax, edi
je 0x40cb20
mov dword [esp], eax
call fcn.006eb330
jmp 0x40cb20
mov dword [esp], 0x71b994
call fcn.006dfd70
mov ebx, eax
mov eax, dword [ebp - 0x2128]
mov dword [ebp - method.nInst.virtual_0], vtable.nInst.0
test eax, eax
je 0x40d02a
mov dword [esp], eax
call fcn.006eb310
mov eax, dword [ebp - 0x223c]
mov dword [ebp - method.nInst.virtual_0], vtable.nInst.0
test eax, eax
je 0x40d046
mov dword [esp], eax
call fcn.006eb310
mov dword [esp], ebx
call fcn.005d7530
nop
lea eax, [ebp - 0x22c0]
lea ecx, [ebp - 0x226c]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.006c1e40
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 0x40cc3e
lea eax, [ebp - 0x22b8]
lea ecx, [ebp - 0x2284]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.006c1e40
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 0x40cf1b
lea eax, [ebp - 0x22bc]
lea ecx, [ebp - 0x229c]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.006c1e40
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 0x40cdc2
mov eax, dword [ebp - 0x226c]
lea edi, [ebp - 0x2264]
cmp eax, edi
je 0x40d17c
mov dword [esp], eax
call fcn.006eb330
mov eax, dword [ebp - 0x2238]
mov dword [esp + 4], 0x71b574
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__wfopen]
test eax, eax
mov edi, eax
je 0x40d375
mov dword [esp + 0xc], 2
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call fcn.005dad00
mov dword [esp], edi
call fcn.005daa60
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.005dad00
mov eax, dword [ebp - 0x22dc]
mov dword [esp], eax
call fcn.006eb360
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 0x40d366
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.0041acd0
sub esp, 0x10
mov ecx, dword [ebp + 8]
mov dword [esp], ebx
call fcn.0040ba50
mov dword [ebx + 0x20], eax
mov eax, dword [ebp - 0x22e0]
sub esp, 4
mov dword [esp], eax
call fcn.006eb310
jmp 0x40ccc6
movzx ecx, word [edi]
mov word [eax], cx
jmp 0x40cc3e
mov ecx, dword [ebp - 0x22e0]
movzx ecx, word [ecx]
mov word [eax], cx
jmp 0x40cf1b
mov ecx, dword [ebp - 0x22e0]
movzx ecx, word [ecx]
mov word [eax], cx
jmp 0x40cdc2
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 0x40ce14
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 0x40cf53
mov dword [esp], 0x71b994
call fcn.006dfd70
mov dword [esp], 0x71b994
call fcn.006dfd70
mov dword [esp], 0x71b994
call fcn.006dfd70
mov dword [ebp - 0x22dc], 0
jmp 0x40d287
mov eax, dword [ebp - 0x2238]
mov dword [esp + 4], str.ERROR:_file_not_found__S_n
mov dword [esp], 0x835180
mov dword [esp + 8], eax
call fcn.0041e920
jmp 0x40cb20