Function at 0x405c90
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cfcd8
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push esi
push edi
mov eax, dword [0x510a50]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
call fcn.00467e07
xor ecx, ecx
xor esi, esi
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x405cd3
push 0x80004005
call fcn.004017c0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
push esi
lea ecx, [ebp - 0x10]
push ecx
mov dword [ebp - 4], esi
mov eax, dword [ebx + 0xa8]
mov edi, dword [sym.imp.KERNEL32.DLL_ReadFile]
push 4
lea edx, [ebx + 0xb0]
push edx
push eax
mov dword [ebp - 0x10], esi
call edi
test eax, eax
jne 0x405d43
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405d2f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx + 0xa8]
push esi
lea ecx, [ebp - 0x10]
push ecx
push 4
lea edx, [ebp - 0x18]
push edx
push eax
mov dword [ebp - 0x18], esi
call edi
test eax, eax
jne 0x405d9a
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405d84
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0xfffffffe
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x18]
push ecx
mov dword [ebp - 0x20], esi
call fcn.00460bbb
add esp, 4
push eax
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], esi
call fcn.00406830
push esi
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x18]
mov esi, dword [ebp - 0x2c]
mov ecx, dword [ebx + 0xa8]
lea edx, [ebp - 0x10]
push edx
push eax
push esi
push ecx
call edi
test eax, eax
je 0x405dfd
mov eax, dword [ebp - 0x10]
add dword [ebp - 0x20], eax
test eax, eax
je 0x405e45
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0x20], eax
jae 0x405e45
push 0
lea edx, [ebp - 0x10]
push edx
push eax
mov eax, dword [ebx + 0xa8]
push esi
push eax
call edi
test eax, eax
jne 0x405dd6
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 0
call fcn.004067d0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405e2f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0xfffffffd
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov edi, dword [ebx + 0xb4]
mov ecx, 0x88
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebx + 0xa8]
mov edi, dword [sym.imp.KERNEL32.DLL_ReadFile]
xor esi, esi
push esi
lea ecx, [ebp - 0x10]
push ecx
push 4
lea edx, [ebp - 0x1c]
push edx
push eax
mov dword [ebp - 0x1c], esi
call edi
test eax, eax
jne 0x405ecb
mov ecx, dword [ebx + 0x20]
push esi
push esi
push 0x10
push ecx
call dword [sym.imp.USER32.dll_PostMessageW]
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 0
call fcn.004067d0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405eb5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0xfffffffc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x1c]
cmp eax, esi
jne 0x405efc
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 0
call fcn.004067d0
lea ecx, [ebp - 0x14]
call fcn.00412740
mov eax, 0xfffffffb
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push eax
call fcn.00460bbb
xor ecx, ecx
add esp, 4
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
push eax
lea ecx, [ebp - 0x24]
call fcn.004068f0
push 0
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x24]
lea ecx, [ebp - 0x10]
push ecx
mov ecx, dword [ebx + 0xa8]
push edx
push eax
push ecx
mov dword [ebp - 0x10], 0
call edi
test eax, eax
je 0x405f73
lea esp, [esp]
mov eax, dword [ebp - 0x10]
add esi, eax
test eax, eax
mov eax, dword [ebp - 0x1c]
je 0x405fb9
cmp esi, eax
jae 0x405fb9
mov ecx, dword [ebx + 0xa8]
push 0
lea edx, [ebp - 0x10]
push edx
sub eax, esi
push eax
mov eax, dword [ebp - 0x24]
add eax, esi
push eax
push ecx
mov dword [ebp - 0x10], 0
call edi
test eax, eax
jne 0x405f40
mov edx, dword [ebx + 0x20]
push 0
push 0
push 0x10
push edx
call dword [sym.imp.USER32.dll_PostMessageW]
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 1
call fcn.004067d0
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 0
call fcn.004067d0
lea ecx, [ebp - 0x14]
call fcn.00412740
mov eax, 0xfffffffa
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x406017
mov ecx, dword [ebp - 0x24]
push eax
mov eax, dword [ebx + 0x9c]
push eax
call fcn.004097e0
test al, al
jne 0x406017
mov ecx, dword [ebx + 0x20]
push 0
push 0
push 0x10
push ecx
call dword [sym.imp.USER32.dll_PostMessageW]
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 1
call fcn.004067d0
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 0
call fcn.004067d0
lea ecx, [ebp - 0x14]
call fcn.00412740
mov eax, 0xfffffff9
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 1
call fcn.004067d0
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 0
call fcn.004067d0
lea ecx, [ebp - 0x14]
call fcn.00412740
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret