Function at 0x406a00
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4c221a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x90
mov eax, dword [0x508e4c]
xor eax, esp
push ebx
push ebp
push esi
mov esi, dword [esp + 0xb0]
mov dword [esp + 0x98], eax
mov eax, dword [esp + 0xb4]
push edi
xor ebp, ebp
mov edi, 7
push esi
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], 0x80004005
mov dword [esp + 0x80], edi
mov dword [esp + 0x7c], ebp
mov word [esp + 0x6c], bp
call fcn.004a9141
add esp, 4
push eax
push esi
lea ecx, [esp + 0x6c]
call fcn.00405640
push 0xb
push ebp
lea ecx, [esp + 0x88]
push ecx
lea ecx, [esp + 0x70]
mov dword [esp + 0xb4], ebp
call fcn.004057e0
push 0x4c58ec
mov byte [esp + 0xac], 1
call fcn.004a9141
mov edx, dword [esp + 0x98]
add esp, 4
push eax
push 0x4c58ec
push edx
push ebp
lea ecx, [esp + 0x90]
call fcn.004044f0
test eax, eax
jne 0x406bc8
push 0xffffffffffffffff
push 0xb
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x70]
call fcn.004057e0
push 0xffffffffffffffff
push ebp
push eax
lea ecx, [esp + 0x70]
mov byte [esp + 0xb4], 2
call fcn.00405530
mov eax, dword [esp + 0x2c]
mov esi, 8
cmp eax, esi
mov byte [esp + 0xa8], 1
jb 0x406b0e
mov ecx, dword [esp + 0x18]
push ecx
call fcn.004a7e92
add esp, 4
lea edx, [esp + 0x48]
push edx
call fcn.00448720
mov ecx, eax
call fcn.00448770
mov eax, dword [esp + 0x5c]
lea ebx, [eax - 1]
cmp eax, ebx
mov byte [esp + 0xa8], 3
ja 0x406b3b
lea ecx, [esp + 0x48]
call fcn.004a798e
cmp dword [esp + 0x60], esi
mov eax, dword [esp + 0x4c]
jae 0x406b49
lea eax, [esp + 0x4c]
cmp word [eax + ebx*2], 0x5c
je 0x406b6c
push 0x4c58e8
call fcn.004a9141
add esp, 4
push eax
push 0x4c58e8
lea ecx, [esp + 0x50]
call fcn.004053b0
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x1c]
push edx
call fcn.00405ad0
add esp, 0xc
push 0xffffffffffffffff
push ebp
push eax
lea ecx, [esp + 0x70]
mov byte [esp + 0xb4], 4
call fcn.00405530
cmp dword [esp + 0x2c], esi
jb 0x406bab
mov eax, dword [esp + 0x18]
push eax
call fcn.004a7e92
add esp, 4
cmp dword [esp + 0x60], esi
mov byte [esp + 0xa8], 1
jb 0x406bcd
mov ecx, dword [esp + 0x4c]
push ecx
call fcn.004a7e92
add esp, 4
jmp 0x406bcd
mov esi, 8
push edi
push ebp
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x70]
call fcn.004057e0
mov ebx, eax
push 0x4c58d8
mov byte [esp + 0xac], 5
call fcn.004a9141
add esp, 4
push eax
mov eax, dword [ebx + 0x14]
push 0x4c58d8
push eax
push ebp
mov ecx, ebx
call fcn.004044f0
mov ebx, eax
mov eax, dword [esp + 0x2c]
neg ebx
sbb bl, bl
inc bl
cmp eax, esi
mov byte [esp + 0xa8], 1
jb 0x406c2b
mov ecx, dword [esp + 0x18]
push ecx
call fcn.004a7e92
add esp, 4
test bl, bl
je 0x406da8
push 0xffffffffffffffff
push edi
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x70]
call fcn.004057e0
push 0xffffffffffffffff
push ebp
push eax
lea ecx, [esp + 0x70]
mov byte [esp + 0xb4], 6
call fcn.00405530
cmp dword [esp + 0x2c], esi
mov byte [esp + 0xa8], 1
jb 0x406c74
mov eax, dword [esp + 0x18]
push eax
call fcn.004a7e92
add esp, 4
lea ecx, [esp + 0x48]
push ecx
call fcn.00448720
mov ecx, eax
call fcn.00448770
lea edx, [esp + 0x64]
push edx
push eax
lea eax, [esp + 0x1c]
push eax
mov byte [esp + 0xb4], 7
call fcn.00405ad0
add esp, 0xc
push 0xffffffffffffffff
push ebp
push eax
lea ecx, [esp + 0x70]
mov byte [esp + 0xb4], 8
call fcn.00405530
cmp dword [esp + 0x2c], esi
jb 0x406cc8
mov ecx, dword [esp + 0x18]
push ecx
call fcn.004a7e92
add esp, 4
cmp dword [esp + 0x60], esi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x28], ebp
mov word [esp + 0x18], bp
mov byte [esp + 0xa8], 1
jb 0x406cf0
mov edx, dword [esp + 0x4c]
push edx
call fcn.004a7e92
add esp, 4
push 0x4c58e8
mov dword [esp + 0x30], edi
mov dword [esp + 0x2c], ebp
mov word [esp + 0x1c], bp
call fcn.004a9141
add esp, 4
push eax
push 0x4c58e8
lea ecx, [esp + 0x1c]
call fcn.00405640
push 0x4c57b4
mov byte [esp + 0xac], 9
mov dword [esp + 0x64], edi
mov dword [esp + 0x60], ebp
mov word [esp + 0x50], bp
call fcn.004a9141
add esp, 4
push eax
push 0x4c57b4
lea ecx, [esp + 0x50]
call fcn.00405640
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x6c]
push edx
mov byte [esp + 0xb4], 0xa
call fcn.00446b90
mov ecx, eax
call fcn.004481c0
cmp dword [esp + 0x60], esi
jb 0x406d80
mov eax, dword [esp + 0x4c]
push eax
call fcn.004a7e92
add esp, 4
cmp dword [esp + 0x2c], esi
mov dword [esp + 0x60], edi
mov dword [esp + 0x5c], ebp
mov word [esp + 0x4c], bp
mov byte [esp + 0xa8], 1
jb 0x406da8
mov ecx, dword [esp + 0x18]
push ecx
call fcn.004a7e92
add esp, 4
lea edx, [esp + 0x10]
push edx
push 1
push ebp
mov dword [esp + 0x1c], ebp
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
cmp dword [esp + 0x7c], esi
mov eax, dword [esp + 0x68]
jae 0x406dc8
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 0x406e77
push 0x100000
call fcn.004a7989
add esp, 4
push ebp
mov esi, eax
lea eax, [esp + 0x34]
push eax
push 0x100000
push esi
push edi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x406e40
lea esp, [esp]
mov ecx, dword [esp + 0x30]
cmp ecx, ebp
je 0x406e40
mov eax, dword [esp + 0x10]
mov edx, dword [eax]
lea ebx, [esp + 0x3c]
push ebx
push ecx
push esi
push eax
call dword [edx + 0x10]
push ebp
lea eax, [esp + 0x34]
push eax
push 0x100000
push esi
push edi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x406e10
push esi
call fcn.004a8b23
add esp, 4
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx]
lea esi, [esp + 0x40]
push esi
push ebp
push ebp
xor eax, eax
push eax
push ecx
call dword [edx + 0x14]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x34]
mov dword [ecx], eax
xor edi, edi
mov esi, 8
jmp 0x406e7b
mov edi, dword [esp + 0x38]
cmp dword [esp + 0x98], esi
jb 0x406e94
mov edx, dword [esp + 0x84]
push edx
call fcn.004a7e92
add esp, 4
cmp dword [esp + 0x7c], esi
mov dword [esp + 0x98], 7
mov dword [esp + 0x94], ebp
mov word [esp + 0x84], bp
jb 0x406ec1
mov eax, dword [esp + 0x68]
push eax
call fcn.004a7e92
add esp, 4
mov ecx, dword [esp + 0xa0]
mov eax, edi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x90]
pop ebx
xor ecx, esp
call fcn.004a8b15
add esp, 0x9c
ret 0x10