Function at 0x43f530
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x20
push ebx
push ebp
mov ebp, dword [0x4b0840]
push esi
push edi
push 1
push 0
mov edi, ecx
mov dword [esp + 0x20], ebp
push 0xffffffffffffffff
push 0
mov ecx, ebp
mov dword [esp + 0x3c], edi
call fcn.004759c0
mov esi, dword [esp + 0x34]
or eax, 0xffffffff
mov dword [esp + 0x20], eax
mov eax, dword [0x4ac1d8]
mov byte [esp + 0x13], 0
mov byte [esp + 0x1c], 0
mov dword [esp + 0x24], 0xffffffff
mov ebx, dword [eax + 0xdc]
and ebx, 0x7fffffff
mov dword [esp + 0x28], ebx
mov eax, esi
lea ebx, [ebx]
mov cl, byte [eax]
cmp cl, 0x20
je 0x43f59c
cmp cl, 9
jne 0x43f59f
inc eax
jmp 0x43f590
cmp byte [eax], 0x2a
jne 0x43f6d1
movzx ebx, byte [eax + 1]
lea esi, [eax + 1]
test ebx, 0xffffff80
jne 0x43f5c9
push 2
push ebx
call fcn.0048708c
add esp, 8
test eax, eax
je 0x43f5c9
and ebx, 0xffffffdf
movsx eax, bl
add eax, 0xffffffbd
cmp eax, 0x11
ja case.0x43f5df.68
movzx eax, byte [eax + 0x43fa70]
jmp dword [eax*4 + 0x43fa5c]
mov byte [esp + 0x1c], 1
jmp case.0x43f5df.68
lea ecx, [esi + 1]
call fcn.0042fa40
mov bl, byte [esi]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
test bl, bl
je 0x43f624
mov ecx, 0x4a0c84
mov al, 0x20
lea ecx, [ecx]
cmp bl, al
je 0x43f659
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x43f610
mov bl, byte [esi + 1]
inc esi
test bl, bl
jne 0x43f606
mov eax, dword [0x4ac1d8]
mov dword [eax + 0x30], 0x57
test byte [eax + 0xe0], 1
jne 0x43f6b4
mov ecx, dword [0x4af094]
push 1
push 0
push 0xffffffffffffffff
push 0x4a09f8
call fcn.004759c0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
dec esi
jmp case.0x43f5df.68
lea eax, [esi + 1]
push eax
call fcn.00487180
mov dl, byte [esi]
add esp, 4
mov dword [esp + 0x28], eax
test dl, dl
je 0x43f624
mov ecx, 0x4a0c84
mov al, 0x20
lea esp, [esp]
cmp dl, al
je 0x43f659
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x43f680
mov dl, byte [esi + 1]
inc esi
test dl, dl
jne 0x43f672
jmp 0x43f624
mov byte [esp + 0x13], 1
cmp byte [esi], 0
je 0x43f588
inc esi
cmp byte [esi], 0
je 0x43f588
inc esi
jmp 0x43f588
push 0x49e065
push 0
push 0x4a09f8
mov ecx, edi
call fcn.0042ddd0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
push 0
push 0x8000000
push 3
push 0
push 3
push SysReAllocString
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x43f70c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x4ac1d8]
test byte [ecx + 0xe0], 1
mov dword [ecx + 0x30], eax
jmp 0x43f637
mov ecx, ebx
call fcn.00473ae0
mov esi, eax
mov ecx, esi
and ecx, edx
cmp ecx, 0xffffffff
jne 0x43f745
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x4ac1d8]
push ebx
mov dword [ecx + 0x30], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, edi
call fcn.00430720
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
mov ecx, dword [esp + 0x24]
cmp edx, ecx
jb 0x43f75b
mov eax, dword [esp + 0x20]
ja 0x43f757
cmp esi, eax
jbe 0x43f75b
mov esi, eax
mov edx, ecx
test edx, edx
jne 0x43fa3c
cmp esi, 0xfffffffd
ja 0x43fa3c
mov eax, esi
or eax, edx
jne 0x43f7a5
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x4ac1d8]
mov dword [eax + 0x30], 0
mov ecx, dword [0x4af094]
push 1
push 0
push 0xffffffffffffffff
push 0x49e080
call fcn.004759c0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
cmp byte [esp + 0x1c], 0
je 0x43f874
mov al, byte [ebp + 0x17]
test al, al
jne 0x43f7bd
mov eax, dword [ebp + 0xc]
mov al, byte [eax + 0x17]
cmp al, 2
je 0x43f874
push 0
push 1
lea eax, [esi + 1]
mov byte [esp + 0x3c], 1
push eax
push 0
mov ecx, ebp
call fcn.004759c0
cmp eax, 1
jne 0x43f8a3
push 0
push eax
mov ecx, ebp
call fcn.004024d0
mov edi, eax
test edi, edi
je 0x43f8a3
push 0
lea eax, [esp + 0x18]
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x4ac1d8]
push ebx
mov dword [ecx + 0x30], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebp, ebp
je 0x43f9e9
cmp byte [esp + 0x1c], 0
jne 0x43f993
mov eax, dword [esp + 0x14]
cmp eax, 3
jb 0x43f8b6
cmp byte [edi], 0xef
jne 0x43f8b6
cmp byte [edi + 1], 0xbb
jne 0x43f8b6
cmp byte [edi + 2], 0xbf
jne 0x43f8b6
mov ebx, dword [esp + 0x18]
add eax, 0xfffffffd
push 0xfde9
push eax
lea eax, [edi + 3]
mov ecx, ebx
push eax
call fcn.004764e0
test eax, eax
jne 0x43f935
xor ebp, ebp
jmp 0x43f935
lea eax, [esi + 2]
mov byte [esp + 0x34], 0
push eax
call fcn.00485a15
mov edi, eax
add esp, 4
test edi, edi
jne 0x43f7f8
mov ecx, dword [esp + 0x2c]
push 0x49e065
push eax
push str.Out_of_memory.
call fcn.0042e0a0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
cmp eax, 2
jb 0x43f8ce
cmp byte [edi], 0xff
jne 0x43f8ce
cmp byte [edi + 1], 0xfe
jne 0x43f8ce
lea ecx, [edi + 2]
add eax, 0xfffffffe
jmp 0x43f91d
mov ebx, dword [esp + 0x28]
cmp ebx, 0x4b0
je 0x43f91b
test ebx, ebx
je 0x43f905
call dword [sym.imp.KERNEL32.dll_GetACP]
cmp ebx, eax
je 0x43f901
push ebx
push dword [esp + 0x18]
mov ebx, dword [esp + 0x20]
mov ecx, ebx
push edi
call fcn.004764e0
test eax, eax
jne 0x43f935
xor ebp, ebp
jmp 0x43f935
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
mov ecx, ebx
mov byte [eax + edi], 0
push dword [esp + 0x14]
push edi
call fcn.00476050
jmp 0x43f942
mov ecx, edi
mov ebx, dword [esp + 0x18]
sub esp, 0xc
shr eax, 1
push eax
push ecx
mov ecx, ebx
call fcn.004765b0
neg eax
sbb eax, eax
and ebp, eax
test edi, edi
je 0x43f942
push edi
call fcn.004858b4
add esp, 4
push 0
push 1
mov ecx, ebx
call fcn.004024d0
cmp byte [esp + 0x13], 0
mov esi, eax
je 0x43fa0d
mov ecx, ebx
call fcn.00414a10
mov dword [esp + 0x34], eax
mov edx, 0x4a42f0
lea eax, [esp + 0x34]
mov ecx, esi
push eax
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 1
push 0x4a1bac
call fcn.00473290
add esp, 0x18
mov ecx, ebx
push dword [esp + 0x34]
call fcn.004149d0
jmp 0x43fa0d
mov ebx, dword [esp + 0x18]
mov al, byte [ebx + 0x17]
test al, al
jne 0x43f9a4
mov eax, dword [ebx + 0xc]
mov al, byte [eax + 0x17]
cmp al, 2
jne 0x43f9d6
mov edx, dword [esp + 0x14]
mov ecx, edi
call fcn.004757f0
push edi
lea esi, [eax - 1]
neg esi
sbb esi, esi
call fcn.004858b4
add esp, 4
inc esi
jne 0x43f785
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
mov esi, dword [esp + 0x14]
mov ecx, ebx
mov byte [esi + edi], 0
call fcn.004149a0
mov dword [eax], esi
jmp 0x43fa0d
mov ebx, dword [esp + 0x18]
mov ecx, ebx
mov byte [edi], 0
call fcn.004149a0
cmp byte [esp + 0x34], 0
mov dword [eax], 0
jne 0x43fa0d
push edi
call fcn.004858b4
add esp, 4
push dword [esp + 0x1c]
mov ecx, ebx
call fcn.00414aa0
test eax, eax
je 0x43f8aa
mov ecx, dword [esp + 0x2c]
test ebp, ebp
sete al
movzx eax, al
push eax
call fcn.0042de70
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
push 0x49e065
push 0
push str.Out_of_memory.
mov ecx, edi
call fcn.0042e0a0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4