Function at 0x430630
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45bed6
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x478040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov edi, dword [ebp + 8]
mov dword [ebp - 0x74], edi
mov eax, dword [edi + 0x18]
not eax
test al, 1
je 0x430724
push 0x100
push 0x40
push 0x8000
push dword [ebx + 0x1c8]
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x18], 0
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__sopen_s]
mov eax, dword [ebp - 0x4c]
add esp, 0x14
cmp eax, 0xffffffff
je 0x430710
lea ecx, [ebp - 0x70]
push ecx
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__fstat32]
add esp, 8
test eax, eax
jne 0x4306fa
mov ecx, dword [ebp - 0x5c]
lea eax, [ecx - 1]
cmp eax, 0x1dcd64fe
ja 0x4306fa
push ecx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
je 0x4306fa
push dword [ebp - 0x5c]
push esi
push dword [ebp - 0x4c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
add esp, 0xc
mov ecx, edi
push dword [ebp - 0x5c]
push esi
call dword [sym.imp.mfc140.dll_Ordinal_14518]
push esi
mov dword [ebp - 0x18], 1
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push dword [ebp - 0x4c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__close]
add esp, 4
cmp dword [ebp - 0x18], 0
jne 0x430e61
push 0xffffffffffffffff
push 0x30
push 0x247
call dword [sym.imp.mfc140.dll_Ordinal_2297]
jmp 0x430e61
mov ecx, dword [ebx + 0xdc]
call fcn.00405a60
mov edi, dword [ebx + 0xdc]
mov ecx, dword [edi + 0xa9cd8]
mov dword [edi + 0xcd138], 1
call fcn.004171a0
push 0x16e
lea esi, [edi + 0xa9e68]
push 0
push esi
call sub.VCRUNTIME140.dll_memset
push 0x27
lea eax, [edi + 0xaa008]
mov dword [edi + 0xa9e71], 0x1010105
push 0
push eax
mov word [edi + 0xa9e75], 0x101
mov byte [esi], 1
mov byte [edi + 0xa9e6e], 1
mov byte [edi + 0xa9e70], 5
call sub.VCRUNTIME140.dll_memset
mov dword [edi + 0xcd17c], 0
add esp, 0x18
cmp dword [ebx + 0xd8], 2
mov eax, dword [ebx + 0xdc]
mov eax, dword [eax + 0xa9cd8]
mov eax, dword [eax]
jne 0x4307bb
mov byte [eax + 0xa], 1
jmp 0x4307bf
mov byte [eax + 0xa], 0
mov ecx, dword [ebp - 0x74]
lea edx, [ebp - 0x20]
push edx
mov ecx, dword [ecx + 0x24]
mov eax, dword [ecx]
call dword [eax + 0x20]
push 0x100
push 0x40
push 0x8000
mov dword [ebp - 4], 0
lea eax, [ebp - 0x1c]
push dword [ebp - 0x20]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__sopen_s]
mov eax, dword [ebp - 0x1c]
add esp, 0x14
cmp eax, 0xffffffff
jne 0x43085e
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc140.dll_Ordinal_316]
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x4c], 0
push ecx
push 0x400
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push dword [ebp - 0x4c]
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc140.dll_Ordinal_1529]
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0
push 0x30
push dword [ebp - 0x14]
call dword [sym.imp.mfc140.dll_Ordinal_2298]
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc140.dll_Ordinal_1044]
jmp 0x430e58
push dword [ebx + 0xd8]
mov ecx, ebx
push eax
call fcn.00433550
test eax, eax
jne 0x430884
push 0xffffffffffffffff
push 0x30
push 0x248
call dword [sym.imp.mfc140.dll_Ordinal_2297]
jmp 0x430e4c
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc140.dll_Ordinal_316]
mov byte [ebp - 4], 2
mov eax, dword [ebx + 0xdc]
mov eax, dword [eax + 0xa9cd8]
mov eax, dword [eax]
cmp byte [eax + 0x9c9d3], 0
je 0x4308af
mov ecx, ebx
call fcn.00430e80
mov esi, dword [ebx + 0xdc]
lea eax, [ebp - 0x48]
push 0x27
push 0
push eax
add esi, 0xaa008
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x48]
mov edx, 0x23
mov eax, dword [esi]
cmp eax, dword [ecx]
jne 0x4308f4
add esi, 4
add ecx, 4
sub edx, 4
jae 0x4308d3
mov ax, word [esi]
cmp ax, word [ecx]
jne 0x4308f4
mov al, byte [esi + 2]
cmp al, byte [ecx + 2]
je 0x4308ff
lea eax, [ebp - 0x14]
mov ecx, ebx
push eax
call fcn.00431200
mov ecx, dword [ebx + 0xdc]
call fcn.00407840
test eax, eax
je 0x430db5
lea ecx, [ebp - 0x4c]
call dword [sym.imp.mfc140.dll_Ordinal_316]
push 0x46a554
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call dword [sym.imp.mfc140.dll_Ordinal_1696]
push 0x151
lea ecx, [ebp - 0x4c]
call dword [sym.imp.mfc140.dll_Ordinal_8426]
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc140.dll_Ordinal_1692]
push 0x46a55c
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc140.dll_Ordinal_1696]
push 0x373
lea ecx, [ebp - 0x4c]
call dword [sym.imp.mfc140.dll_Ordinal_8426]
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc140.dll_Ordinal_1692]
mov eax, dword [ebx + 0xdc]
xor esi, esi
mov edx, dword [eax + 0xa9d38]
test edx, edx
je 0x430ad9
nop word [eax + eax]
cmp byte [edx + 0x557], 1
lea ecx, [esi + 1]
mov edx, dword [edx]
cmovne ecx, esi
mov esi, ecx
test edx, edx
jne 0x430990
test esi, esi
jle 0x430ad9
lea ecx, [ebp - 0x18]
call dword [sym.imp.mfc140.dll_Ordinal_316]
mov byte [ebp - 4], 4
mov eax, dword [ebx + 0xdc]
mov eax, dword [eax + 0xa9d38]
test eax, eax
je 0x430acc
nop
mov edx, eax
mov ecx, eax
mov eax, dword [eax]
mov dword [ebp - 0x78], eax
mov eax, dword [ebx + 0xdc]
cmp byte [edx + 0x557], 0
lea esi, [edx + 8]
mov dword [ebp - 0x74], ecx
je 0x430a5d
push ecx
mov ecx, eax
call fcn.004075b0
push str._r_n_
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc140.dll_Ordinal_1696]
mov eax, dword [ebx + 0xdc]
mov eax, dword [eax + 0xcd160]
cmp eax, 1
jne 0x430a26
cmp byte [esi + 0x4d0], 0
je 0x430a3b
add esi, 0x4d0
jmp 0x430a3b
cmp eax, 2
jne 0x430a3b
cmp byte [esi + 0x4e8], 0
lea eax, [esi + 0x4e8]
cmovne esi, eax
push esi
lea eax, [ebp - 0x18]
push 0x152
push eax
call dword [sym.imp.mfc140.dll_Ordinal_4806]
add esp, 0xc
lea eax, [ebp - 0x18]
lea ecx, [ebp - 0x14]
push eax
call dword [sym.imp.mfc140.dll_Ordinal_1692]
jmp 0x430ac1
cmp byte [edx + 0x5ac], 0
mov eax, dword [eax + 0xa9cd8]
mov eax, dword [eax]
mov al, byte [eax + 0xa]
jne 0x430a7a
cmp dword [edx + 0x5a8], 0
jle 0x430ac1
cmp al, 3
je 0x430a82
cmp al, 2
jne 0x430ac1
mov esi, dword [edx + 0x5a8]
mov edi, 1
test esi, esi
jle 0x430ab5
add edx, 0x558
mov eax, dword [edx]
lea edx, [edx + 4]
xor ecx, ecx
cmp byte [eax + 0x557], cl
cmovne ecx, edi
mov edi, ecx
sub esi, 1
jne 0x430a97
test edi, edi
je 0x430ac1
mov ecx, dword [ebp - 0x74]
push ecx
mov ecx, dword [ebx + 0xdc]
call fcn.004075b0
mov eax, dword [ebp - 0x78]
test eax, eax
jne 0x4309d0
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 3
call dword [sym.imp.mfc140.dll_Ordinal_1044]
mov eax, dword [ebx + 0xdc]
xor esi, esi
mov edx, dword [eax + 0xa9de0]
test edx, edx
je 0x430b79
nop
cmp byte [edx + 0x610], 1
lea ecx, [esi + 1]
mov edx, dword [edx]
cmovne ecx, esi
mov esi, ecx
test edx, edx
jne 0x430af0
test esi, esi
jle 0x430b79
lea ecx, [ebp - 0x18]
call dword [sym.imp.mfc140.dll_Ordinal_316]
mov byte [ebp - 4], 5
mov eax, dword [ebx + 0xdc]
mov esi, dword [eax + 0xa9de0]
test esi, esi
je 0x430b6c
mov edi, esi
mov esi, dword [esi]
add edi, 8
cmp byte [edi + 0x608], 0
je 0x430b68
push str._r_n_
lea ecx, [ebp - 0x14]
mov byte [edi + 0x20], 0
call dword [sym.imp.mfc140.dll_Ordinal_1696]
push edi
lea eax, [ebp - 0x18]
push 0x153
push eax
call dword [sym.imp.mfc140.dll_Ordinal_4806]
add esp, 0xc
lea eax, [ebp - 0x18]
lea ecx, [ebp - 0x14]
push eax
call dword [sym.imp.mfc140.dll_Ordinal_1692]
test esi, esi
jne 0x430b26
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 3
call dword [sym.imp.mfc140.dll_Ordinal_1044]
mov eax, dword [ebx + 0xdc]
cmp byte [eax + 0xa9cd1], 1
jne 0x430c99
lea ecx, [ebp - 0x18]
call dword [sym.imp.mfc140.dll_Ordinal_316]
mov byte [ebp - 4], 6
mov eax, dword [ebx + 0xdc]
mov ecx, dword [eax + 0xa9dfc]
test ecx, ecx
je 0x430c8c
nop dword [eax]
mov esi, ecx
mov edi, ecx
mov ecx, dword [ecx]
add esi, 8
mov dword [ebp - 0x74], ecx
cmp dword [esi + 0xe98], 0
jne 0x430c84
push str._r_n_
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc140.dll_Ordinal_1696]
push esi
lea eax, [ebp - 0x18]
push 0x154
push eax
call dword [sym.imp.mfc140.dll_Ordinal_4806]
add esp, 0xc
lea eax, [ebp - 0x18]
lea ecx, [ebp - 0x14]
push eax
call dword [sym.imp.mfc140.dll_Ordinal_1692]
mov esi, dword [ebx + 0xdc]
mov ecx, dword [edi]
cmp edi, dword [esi + 0xa9dfc]
jne 0x430c0f
mov dword [esi + 0xa9dfc], ecx
jmp 0x430c14
mov eax, dword [edi + 4]
mov dword [eax], ecx
mov ecx, dword [edi + 4]
cmp edi, dword [esi + 0xa9e00]
jne 0x430c27
mov dword [esi + 0xa9e00], ecx
jmp 0x430c2c
mov eax, dword [edi]
mov dword [eax + 4], ecx
mov eax, dword [esi + 0xa9e08]
mov dword [edi], eax
add dword [esi + 0xa9e04], 0xffffffff
mov dword [esi + 0xa9e08], edi
jne 0x430c81
mov ecx, dword [esi + 0xa9e0c]
mov dword [esi + 0xa9e04], 0
mov dword [esi + 0xa9e08], 0
mov dword [esi + 0xa9e00], 0
mov dword [esi + 0xa9dfc], 0
call dword [sym.imp.mfc140.dll_Ordinal_4841]
mov dword [esi + 0xa9e0c], 0
mov ecx, dword [ebp - 0x74]
test ecx, ecx
jne 0x430bb0
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 3
call dword [sym.imp.mfc140.dll_Ordinal_1044]
mov eax, dword [ebx + 0xdc]
cmp byte [eax + 0xa9cd2], 1
jne 0x430d9a
lea ecx, [ebp - 0x18]
call dword [sym.imp.mfc140.dll_Ordinal_316]
mov byte [ebp - 4], 7
mov eax, dword [ebx + 0xdc]
mov edi, dword [eax + 0xa9e34]
test edi, edi
je 0x430d8d
nop dword [eax]
mov esi, dword [ebx + 0xdc]
mov ecx, edi
mov edi, dword [edi]
cmp ecx, dword [esi + 0xa9e34]
jne 0x430cea
mov dword [esi + 0xa9e34], edi
jmp 0x430cef
mov eax, dword [ecx + 4]
mov dword [eax], edi
mov edx, dword [ecx + 4]
cmp ecx, dword [esi + 0xa9e38]
jne 0x430d02
mov dword [esi + 0xa9e38], edx
jmp 0x430d07
mov eax, dword [ecx]
mov dword [eax + 4], edx
mov eax, dword [esi + 0xa9e40]
mov dword [ecx], eax
add dword [esi + 0xa9e3c], 0xffffffff
mov dword [esi + 0xa9e40], ecx
jne 0x430d5c
mov ecx, dword [esi + 0xa9e44]
mov dword [esi + 0xa9e3c], 0
mov dword [esi + 0xa9e40], 0
mov dword [esi + 0xa9e38], 0
mov dword [esi + 0xa9e34], 0
call dword [sym.imp.mfc140.dll_Ordinal_4841]
mov dword [esi + 0xa9e44], 0
test edi, edi
jne 0x430cd0
push str._r_n_
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc140.dll_Ordinal_1696]
push 0x155
lea ecx, [ebp - 0x18]
call dword [sym.imp.mfc140.dll_Ordinal_8426]
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc140.dll_Ordinal_1692]
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 3
call dword [sym.imp.mfc140.dll_Ordinal_1044]
push str._r_n_r_n_r_n
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc140.dll_Ordinal_1696]
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 2
call dword [sym.imp.mfc140.dll_Ordinal_1044]
mov eax, dword [ebp - 0x14]
cmp dword [eax - 0xc], 0
je 0x430e3c
lea ecx, [ebp - 0x18]
call dword [sym.imp.mfc140.dll_Ordinal_316]
push 0xa7
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 8
call dword [sym.imp.mfc140.dll_Ordinal_8426]
mov eax, dword [ebx + 0xdc]
lea ecx, [ebp - 0x18]
push dword [eax + 0xa9cdc]
call dword [sym.imp.mfc140.dll_Ordinal_2986]
test eax, eax
jne 0x430e04
mov ecx, dword [ebx + 0xdc]
add ecx, 0xa9cdc
call dword [sym.imp.mfc140.dll_Ordinal_4315]
mov ecx, dword [ebx + 0xdc]
add ecx, 0xa9cdc
mov eax, dword [ecx]
cmp dword [eax - 0xc], 0
jne 0x430e24
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.mfc140.dll_Ordinal_1526]
jmp 0x430e2f
push dword [ebp - 0x14]
push 0
call dword [sym.imp.mfc140.dll_Ordinal_7998]
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call dword [sym.imp.mfc140.dll_Ordinal_1044]
mov ecx, ebx
call fcn.004331a0
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc140.dll_Ordinal_1044]
push dword [ebp - 0x1c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__close]
add esp, 4
lea ecx, [ebp - 0x20]
call dword [sym.imp.mfc140.dll_Ordinal_1044]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004592a5
mov esp, ebp
pop ebp
ret 4