Function at 0x409fa0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push ebx
mov ebx, dword [esp + 0x20]
push ebp
push esi
mov esi, dword [esp + 0x24]
xor ebp, ebp
push edi
or edi, 0xffffffff
cmp esi, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], edi
mov dword [ebx], ebp
je 0x409fc7
cmp byte [esi], 0
jne 0x409fd2
mov dword [ebx], 0x57
jmp 0x40a52c
call fcn.0040eb70
cmp eax, ebp
mov dword [ebx], eax
jne 0x40a52c
mov al, byte [esp + 0x30]
test al, al
push ebp
push ebp
push 3
push ebp
je 0x409ff7
push 1
push 0xc0000000
jmp 0x409ffe
push 3
push SysReAllocString
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, edi
mov dword [esp + 0x14], eax
jne 0x40a015
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx], eax
cmp dword [ebx], ebp
jne 0x40a52c
push 0x1a0
call fcn.0042a10c
mov edi, eax
add esp, 4
cmp edi, ebp
mov dword [esp + 0x10], edi
jne 0x40a03f
mov dword [ebx], 8
jmp 0x40a52c
xor eax, eax
mov ecx, 0x68
rep stosd dword es:[edi], eax
cmp dword [ebx], ebp
jne 0x40a52c
mov edi, dword [esp + 0x10]
xor eax, eax
mov ecx, 0x68
rep stosd dword es:[edi], eax
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40a062
sub eax, edx
push eax
mov eax, dword [esp + 0x14]
push esi
push eax
call fcn.0042baa0
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov dword [ecx + 0x108], edx
mov eax, dword [esp + 0x1c]
lea ecx, [eax + 0x158]
mov dword [eax + 0x14c], ecx
mov edx, dword [esp + 0x1c]
mov dword [edx + 0x13c], ebp
mov eax, dword [ebx]
add esp, 0xc
cmp eax, ebp
mov dword [esp + 0x14], 0xffffffff
jne 0x40a52c
mov edx, dword [esp + 0x10]
push ebp
xor eax, eax
lea ecx, [esp + 0x24]
push ecx
mov dword [esp + 0x28], ebp
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push eax
mov dword [esp + 0x28], eax
mov eax, dword [edx + 0x108]
push eax
call ebp
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 0x14c]
mov eax, dword [eax + 0x108]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea ecx, [esp + 0x1c]
push ecx
push 0x36
push edx
push eax
call ebx
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x14c]
mov ecx, dword [ecx]
mov edx, eax
mov esi, dword [edx + 0x160]
mov dword [eax + 0x130], esi
mov eax, dword [edx + 0x164]
mov edx, dword [esp + 0x10]
mov dword [edx + 0x134], eax
cmp dword [esp + 0x18], 0x36
je 0x40a13b
mov eax, dword [esp + 0x2c]
mov dword [eax], 0xb
jmp 0x40a528
cmp ecx, 0x1a4d504b
jne 0x40a181
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x110], 0x200
mov edx, dword [esp + 0x10]
mov dword [edx + 0x114], 0
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x14c]
cmp dword [ecx + 0x10], 0x578
je 0x40a195
mov edx, dword [esp + 0x2c]
mov dword [edx], 0x32
jmp 0x40a528
mov eax, dword [esp + 0x2c]
pop edi
pop esi
pop ebp
mov dword [eax], 0xb
xor eax, eax
pop ebx
add esp, 0x14
ret
mov ecx, dword [esp + 0x2c]
cmp dword [ecx], 0
jne 0x40a528
mov edx, dword [eax + 0x14c]
mov cl, byte [edx + 0x14]
mov esi, 0x200
shl esi, cl
mov dword [eax + 0x138], esi
mov esi, dword [esp + 0x10]
call fcn.00409e80
test eax, eax
mov ecx, dword [esp + 0x2c]
mov dword [ecx], eax
jne 0x40a528
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x14c]
mov edx, dword [ecx + 0x2a]
cmp edx, dword [ecx + 0x26]
jbe 0x40a1ed
mov eax, ecx
mov ecx, dword [eax + 0x26]
mov dword [eax + 0x2a], ecx
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 0x14c]
mov esi, dword [edx + 0x26]
lea eax, [esi + esi*2]
shl eax, 2
push eax
call fcn.0042a10c
mov ecx, dword [esp + 0x14]
lea esi, [esi + esi*4]
shl esi, 2
push esi
mov dword [ecx + 0x150], eax
call fcn.0042a10c
mov edx, dword [esp + 0x18]
mov dword [edx + 0x154], eax
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x138]
push ecx
call fcn.0042a10c
mov edx, dword [esp + 0x1c]
mov dword [edx + 0x144], eax
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 0x14c]
mov eax, dword [eax + 0x26]
mov edi, dword [edx + 0x150]
lea ecx, [eax + eax*2]
shl ecx, 2
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edx, dword [esp + 0x1c]
mov edi, dword [edx + 0x154]
mov ecx, esi
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edx, dword [esp + 0x1c]
mov ecx, dword [edx + 0x138]
mov edi, dword [edx + 0x144]
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0x150]
add esp, 0xc
test ecx, ecx
je 0x40a2c6
mov ecx, dword [eax + 0x154]
test ecx, ecx
je 0x40a2c6
mov ecx, dword [eax + 0x144]
test ecx, ecx
jne 0x40a2d5
mov eax, dword [esp + 0x2c]
mov dword [eax], 8
jmp 0x40a528
mov ecx, dword [esp + 0x2c]
cmp dword [ecx], 0
jne 0x40a528
mov edx, dword [eax + 0x14c]
mov ecx, dword [edx + 0x26]
mov edx, dword [eax + 0x118]
lea edi, [ecx + ecx*2]
push 0
lea ecx, [eax + 0x11c]
mov eax, dword [eax + 0x108]
push ecx
push edx
push eax
shl edi, 2
call ebp
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 0x150]
mov eax, dword [eax + 0x108]
push 0
lea ecx, [esp + 0x1c]
push ecx
push edi
push edx
push eax
call ebx
cmp dword [esp + 0x18], edi
je 0x40a33b
mov ecx, dword [esp + 0x2c]
mov dword [ecx], 0x570
jmp 0x40a528
mov edx, dword [esp + 0x2c]
cmp dword [edx], 0
jne 0x40a528
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x150]
shr edi, 2
push edi
push str._hashkey_table_
push ecx
call fcn.0040ed20
mov edx, dword [esp + 0x38]
mov eax, dword [edx]
add esp, 0xc
test eax, eax
jne 0x40a528
mov edx, dword [esp + 0x10]
mov edi, dword [edx + 0x154]
mov ecx, esi
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x14c]
mov ecx, dword [ecx + 0x2a]
push 0
lea edx, [eax + 0x124]
lea esi, [ecx + ecx*4]
mov ecx, dword [eax + 0x120]
push edx
mov edx, dword [eax + 0x108]
push ecx
push edx
shl esi, 2
call ebp
push 0
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x154]
mov edx, dword [eax + 0x108]
push esi
push ecx
push edx
call ebx
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x40a3ed
mov eax, dword [esp + 0x2c]
mov dword [eax], 0x570
jmp 0x40a528
mov ecx, dword [esp + 0x2c]
cmp dword [ecx], 0
jne 0x40a528
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 0x14c]
mov eax, dword [eax + 0x2a]
lea ecx, [eax + eax*4]
mov eax, dword [edx + 0x154]
shl ecx, 2
lea esi, [eax + ecx]
cmp eax, esi
jae 0x40a44c
lea ebx, [ebx]
mov bl, byte [eax + 0x10]
test bl, bl
jne 0x40a430
add eax, 0x14
cmp eax, esi
jb 0x40a420
jmp 0x40a44c
shr ecx, 2
push ecx
mov ecx, dword [edx + 0x154]
push str._block_table_
push ecx
call fcn.0040ed20
mov edx, dword [esp + 0x1c]
add esp, 0xc
mov eax, dword [esp + 0x2c]
cmp dword [eax], 0
jne 0x40a528
test byte [edx + 0x198], 2
jne 0x40a4a8
mov eax, dword [edx + 0x154]
lea ebx, [eax + 0x14]
cmp eax, ebx
jae 0x40a4a8
nop
mov ecx, dword [eax + 0x10]
test ecx, ecx
jns 0x40a4a1
mov ecx, dword [edx + 0x134]
mov esi, dword [eax + 4]
cmp esi, ecx
mov ebp, dword [edx + 0x130]
jg 0x40a4d8
jl 0x40a492
mov esi, dword [eax]
cmp esi, ebp
ja 0x40a4d8
mov edi, dword [eax + 8]
xor esi, esi
cmp esi, ecx
jg 0x40a4d8
jl 0x40a4a1
cmp edi, ebp
ja 0x40a4d8
add eax, 0x14
cmp eax, ebx
jb 0x40a470
push edx
call fcn.0040dea0
mov edx, dword [esp + 0x30]
add esp, 4
test eax, eax
mov dword [edx], eax
jne 0x40a528
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x186]
mov esi, 2
cmp ecx, esi
push 0
push eax
jne 0x40a4e4
call fcn.0040e900
jmp 0x40a4e9
mov ecx, dword [esp + 0x2c]
mov dword [ecx], 0xb
jmp 0x40a528
call fcn.0040e760
mov eax, dword [esp + 0x34]
mov ecx, dword [eax]
add esp, 8
test ecx, ecx
jne 0x40a528
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x186], esi
push eax
jne 0x40a510
call fcn.0040e170
mov ecx, dword [esp + 0x30]
mov dword [ecx], eax
jmp 0x40a51b
call fcn.0040e4e0
mov edx, dword [esp + 0x30]
mov dword [edx], eax
mov eax, dword [esp + 0x30]
mov ecx, dword [eax]
add esp, 4
test ecx, ecx
je 0x40a55c
mov ebx, dword [esp + 0x2c]
lea ecx, [esp + 0x10]
push ecx
call fcn.0040d350
mov eax, dword [esp + 0x18]
add esp, 4
cmp eax, 0xffffffff
je 0x40a549
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebx]
push edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret