Function at 0x406ba0
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x4c222a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc8
mov eax, dword [0x508e4c]
xor eax, esp
push ebx
push ebp
push esi
mov esi, dword [esp + 0xe8]
mov dword [esp + 0xd0], eax
mov eax, dword [esp + 0xec]
push edi
xor ebp, ebp
push esi
mov dword [esp + 0x58], eax
mov dword [esp + 0x1c], 0x80004005
mov dword [esp + 0x80], 7
mov dword [esp + 0x7c], ebp
mov word [esp + 0x6c], bp
call fcn.004a94d1
add esp, 4
push eax
push esi
lea ecx, [esp + 0x6c]
call fcn.004057c0
push 0xb
push ebp
lea ecx, [esp + 0xc0]
push ecx
lea ecx, [esp + 0x70]
mov dword [esp + 0xec], ebp
call fcn.00405950
push 0x4c5908
mov byte [esp + 0xe4], 1
call fcn.004a94d1
mov edx, dword [esp + 0xd0]
add esp, 4
push eax
push 0x4c5908
push edx
push ebp
lea ecx, [esp + 0xc8]
call fcn.00404620
test eax, eax
jne 0x406d95
push 0xffffffffffffffff
push 0xb
lea eax, [esp + 0xa4]
push eax
lea ecx, [esp + 0x70]
call fcn.00405950
push 0xffffffffffffffff
push ebp
push eax
lea ecx, [esp + 0x70]
mov byte [esp + 0xec], 2
call fcn.004056b0
mov eax, dword [esp + 0xb4]
mov ebx, 8
cmp eax, ebx
mov byte [esp + 0xe0], 1
jb 0x406cb6
mov ecx, dword [esp + 0xa0]
push ecx
call fcn.004a8222
add esp, 4
lea edx, [esp + 0x80]
push edx
call fcn.00448a70
mov ecx, eax
call fcn.00448ac0
mov eax, dword [esp + 0x94]
lea edi, [eax - 1]
cmp eax, edi
mov byte [esp + 0xe0], 3
ja 0x406cec
lea ecx, [esp + 0x80]
call fcn.004a7d1e
cmp dword [esp + 0x98], ebx
mov eax, dword [esp + 0x84]
jae 0x406d03
lea eax, [esp + 0x84]
cmp word [eax + edi*2], 0x5c
je 0x406d29
push 0x4c5904
call fcn.004a94d1
add esp, 4
push eax
push 0x4c5904
lea ecx, [esp + 0x88]
call fcn.00405500
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x84]
push ecx
lea edx, [esp + 0xa4]
push edx
call fcn.00405c80
add esp, 0xc
push 0xffffffffffffffff
push ebp
push eax
lea ecx, [esp + 0x70]
mov byte [esp + 0xec], 4
call fcn.004056b0
cmp dword [esp + 0xb4], ebx
jb 0x406d74
mov eax, dword [esp + 0xa0]
push eax
call fcn.004a8222
add esp, 4
cmp dword [esp + 0x98], ebx
mov byte [esp + 0xe0], 1
jb 0x406d95
mov ecx, dword [esp + 0x84]
push ecx
call fcn.004a8222
add esp, 4
push 7
push ebp
lea edx, [esp + 0xa4]
push edx
lea ecx, [esp + 0x70]
call fcn.00405950
mov edi, eax
push 0x4c58f4
mov byte [esp + 0xe4], 5
call fcn.004a94d1
add esp, 4
push eax
mov eax, dword [edi + 0x14]
push 0x4c58f4
push eax
push ebp
mov ecx, edi
call fcn.00404620
mov ebx, eax
mov eax, dword [esp + 0xb4]
neg ebx
sbb bl, bl
mov edi, 8
inc bl
cmp eax, edi
mov byte [esp + 0xe0], 1
jb 0x406e02
mov ecx, dword [esp + 0xa0]
push ecx
call fcn.004a8222
add esp, 4
test bl, bl
je 0x4072a8
push 0xffffffffffffffff
mov ebx, 7
push ebx
lea edx, [esp + 0xa4]
push edx
lea ecx, [esp + 0x70]
call fcn.00405950
push 0xffffffffffffffff
push ebp
push eax
lea ecx, [esp + 0x70]
mov byte [esp + 0xec], 6
call fcn.004056b0
cmp dword [esp + 0xb4], edi
mov byte [esp + 0xe0], 1
jb 0x406e59
mov eax, dword [esp + 0xa0]
push eax
call fcn.004a8222
add esp, 4
lea ecx, [esp + 0x38]
push ecx
call fcn.00448a70
mov ecx, eax
call fcn.00448ac0
lea edx, [esp + 0x64]
push edx
push eax
lea eax, [esp + 0xa4]
push eax
mov byte [esp + 0xec], 7
call fcn.00405c80
add esp, 0xc
push 0xffffffffffffffff
push ebp
push eax
lea ecx, [esp + 0x70]
mov byte [esp + 0xec], 8
call fcn.004056b0
cmp dword [esp + 0xb4], edi
jb 0x406eb6
mov ecx, dword [esp + 0xa0]
push ecx
call fcn.004a8222
add esp, 4
cmp dword [esp + 0x50], edi
mov dword [esp + 0xb4], ebx
mov dword [esp + 0xb0], ebp
mov word [esp + 0xa0], bp
mov byte [esp + 0xe0], 1
jb 0x406ee7
mov edx, dword [esp + 0x3c]
push edx
call fcn.004a8222
add esp, 4
push 0x4c5904
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], ebp
mov word [esp + 0x24], bp
call fcn.004a94d1
add esp, 4
push eax
push 0x4c5904
lea ecx, [esp + 0x24]
call fcn.004057c0
push 0x4c57b4
mov byte [esp + 0xe4], 9
mov dword [esp + 0x9c], ebx
mov dword [esp + 0x98], ebp
mov word [esp + 0x88], bp
call fcn.004a94d1
add esp, 4
push eax
push 0x4c57b4
lea ecx, [esp + 0x88]
call fcn.004057c0
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x84]
push ecx
lea edx, [esp + 0x6c]
push edx
mov byte [esp + 0xec], 0xa
call fcn.00446930
mov ecx, eax
call fcn.00447f60
cmp dword [esp + 0x98], edi
jb 0x406f8c
mov eax, dword [esp + 0x84]
push eax
call fcn.004a8222
add esp, 4
cmp dword [esp + 0x34], edi
mov dword [esp + 0x98], ebx
mov dword [esp + 0x94], ebp
mov word [esp + 0x84], bp
mov byte [esp + 0xe0], 1
jb 0x406fbd
mov ecx, dword [esp + 0x20]
push ecx
call fcn.004a8222
add esp, 4
cmp dword [esp + 0x7c], edi
mov eax, dword [esp + 0x68]
jae 0x406fcb
lea eax, [esp + 0x68]
push 0x4c58ec
push eax
call fcn.004a96fb
add esp, 8
cmp eax, ebp
jne 0x4073f5
lea edx, [esp + 0x80]
push edx
call fcn.00448a70
mov ecx, eax
call fcn.00448ac0
mov edx, dword [esp + 0x98]
cmp edx, edi
mov eax, dword [esp + 0x84]
mov byte [esp + 0xe0], 0xb
mov ebx, eax
jae 0x40701a
lea ebx, [esp + 0x84]
mov eax, ebx
cmp edx, edi
mov ecx, dword [esp + 0x94]
lea eax, [eax + ecx*2]
mov ecx, dword [esp + 0x84]
jae 0x407036
lea ecx, [esp + 0x84]
push 0x4a9654
push ebx
push eax
push ecx
lea edx, [esp + 0x20]
push edx
call fcn.00404b30
push esi
call fcn.004a94d1
add esp, 0x18
push eax
push esi
lea ecx, [esp + 0x6c]
call fcn.004057c0
mov edx, dword [esp + 0x7c]
cmp edx, edi
mov ecx, dword [esp + 0x68]
mov esi, ecx
jae 0x4073ee
lea esi, [esp + 0x68]
mov eax, esi
cmp edx, edi
mov ebx, dword [esp + 0x78]
lea eax, [eax + ebx*2]
jae 0x407083
lea ecx, [esp + 0x68]
push 0x4a9654
push esi
push eax
push ecx
lea eax, [esp + 0x20]
push eax
call fcn.00404b30
add esp, 0x14
push edi
push ebp
lea ecx, [esp + 0x40]
push ecx
lea ecx, [esp + 0x70]
call fcn.00405950
mov esi, eax
push 0x4c58d8
mov byte [esp + 0xe4], 0xc
call fcn.004a94d1
mov edx, dword [esi + 0x14]
add esp, 4
push eax
push 0x4c58d8
push edx
push ebp
mov ecx, esi
call fcn.00404620
mov ebx, eax
mov eax, dword [esp + 0x50]
neg ebx
sbb bl, bl
mov esi, 8
inc bl
cmp eax, esi
mov byte [esp + 0xe0], 0xb
jb 0x4070fb
mov eax, dword [esp + 0x3c]
push eax
call fcn.004a8222
add esp, 4
test bl, bl
je 0x407140
push 0xffffffffffffffff
push esi
lea ecx, [esp + 0x40]
push ecx
lea ecx, [esp + 0x70]
call fcn.00405950
push 0xffffffffffffffff
push ebp
push eax
lea ecx, [esp + 0x70]
mov byte [esp + 0xec], 0xd
call fcn.004056b0
cmp dword [esp + 0x50], esi
mov byte [esp + 0xe0], 0xb
jb 0x407140
mov edx, dword [esp + 0x3c]
push edx
call fcn.004a8222
add esp, 4
mov edi, 7
push 0x4c5904
mov dword [esp + 0x54], edi
mov dword [esp + 0x50], ebp
mov word [esp + 0x40], bp
call fcn.004a94d1
add esp, 4
push eax
push 0x4c5904
lea ecx, [esp + 0x40]
call fcn.004057c0
push 0x4c57b4
mov byte [esp + 0xe4], 0xe
mov dword [esp + 0x38], edi
mov dword [esp + 0x34], ebp
mov word [esp + 0x24], bp
call fcn.004a94d1
add esp, 4
push eax
push 0x4c57b4
lea ecx, [esp + 0x24]
call fcn.004057c0
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x6c]
push edx
mov byte [esp + 0xec], 0xf
call fcn.00446930
mov ecx, eax
call fcn.00447f60
cmp dword [esp + 0x34], esi
jb 0x4071d5
mov eax, dword [esp + 0x20]
push eax
call fcn.004a8222
add esp, 4
cmp dword [esp + 0x50], esi
mov dword [esp + 0x34], edi
mov dword [esp + 0x30], ebp
mov word [esp + 0x20], bp
mov byte [esp + 0xe0], 0xb
jb 0x4071fd
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.004a8222
add esp, 4
push 1
push 0xffffffffffffffff
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x70]
mov dword [esp + 0x1c], 0x5c
call fcn.00404400
push eax
push ebp
lea eax, [esp + 0xa4]
push eax
lea ecx, [esp + 0x70]
call fcn.00405950
lea ecx, [esp + 0x80]
push ecx
lea edx, [esp + 0xa0]
push edx
lea eax, [esp + 0x6c]
push eax
mov byte [esp + 0xec], 0x10
call fcn.00446930
mov ecx, eax
call fcn.00447f60
cmp dword [esp + 0xb4], esi
jb 0x40726c
mov ecx, dword [esp + 0xa0]
push ecx
call fcn.004a8222
add esp, 4
cmp dword [esp + 0x98], esi
mov dword [esp + 0xb4], edi
mov dword [esp + 0xb0], ebp
mov word [esp + 0xa0], bp
mov byte [esp + 0xe0], 1
jb 0x4072a3
mov edx, dword [esp + 0x84]
push edx
call fcn.004a8222
add esp, 4
mov edi, 8
lea eax, [esp + 0x14]
push eax
push 1
push ebp
mov dword [esp + 0x20], ebp
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
cmp dword [esp + 0x7c], edi
mov eax, dword [esp + 0x68]
jae 0x4072c8
lea eax, [esp + 0x68]
push ebp
push ebp
push 3
push ebp
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x407372
push 0x100000
call fcn.004a7d19
add esp, 4
push ebp
lea ecx, [esp + 0x14]
push ecx
push 0x100000
mov esi, eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x407340
lea esp, [esp]
mov ecx, dword [esp + 0x10]
cmp ecx, ebp
je 0x407340
mov eax, dword [esp + 0x14]
mov edx, dword [eax]
lea ebx, [esp + 0x58]
push ebx
push ecx
push esi
push eax
call dword [edx + 0x10]
push ebp
lea eax, [esp + 0x14]
push eax
push 0x100000
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x407310
push esi
call fcn.004a8eb3
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx]
lea esi, [esp + 0x5c]
push esi
push ebp
push ebp
xor eax, eax
push eax
push ecx
call dword [edx + 0x14]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x54]
mov dword [ecx], eax
mov dword [esp + 0x18], ebp
mov eax, dword [esp + 0xd0]
mov esi, 8
cmp eax, esi
jb 0x407392
mov edx, dword [esp + 0xbc]
push edx
call fcn.004a8222
add esp, 4
mov eax, dword [esp + 0x7c]
pop edi
cmp eax, esi
pop esi
mov dword [esp + 0xc4], ebp
mov word [esp + 0xb4], bp
pop ebp
mov dword [esp + 0xc4], 7
pop ebx
jb 0x4073c5
mov eax, dword [esp + 0x58]
push eax
call fcn.004a8222
add esp, 4
mov ecx, dword [esp + 0xc8]
mov eax, dword [esp + 8]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0xc4]
xor ecx, esp
call fcn.004a8ea5
add esp, 0xd4
ret 0x10
mov eax, ecx
jmp 0x407074
push eax
call fcn.004a95a2
add esp, 4
jmp 0x4072a8