Function at 0x40dab0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x449e80
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x45d274]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [0x45d020]
mov edx, dword [eax + 0xc]
xor edi, edi
mov ecx, 0x45d020
mov dword [ebp - 0x24], edi
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
push edi
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x40db20
push 0x104
lea ecx, [ebp - 0x14]
call fcn.004035c0
mov esi, dword [ebp - 0x14]
push 0x104
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, ebx
cmp ebx, 0xffffffff
jne 0x40db4b
mov eax, dword [esi - 8]
push eax
push esi
call fcn.0042f686
add esp, 8
test eax, eax
js 0x40dd3a
cmp eax, dword [esi - 8]
jg 0x40dd3a
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
cmp edi, 0x7a
jne 0x40dbc8
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x7fff
or eax, ecx
jge 0x40db8e
push 0x7fff
lea ecx, [ebp - 0x14]
call fcn.004035c0
mov esi, dword [ebp - 0x14]
push 0x7fff
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp eax, 0xffffffff
jne 0x40dbae
mov eax, dword [esi - 8]
push eax
push esi
call fcn.0042f686
add esp, 8
test eax, eax
js 0x40dd3a
cmp eax, dword [esi - 8]
jg 0x40dd3a
xor edx, edx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], dx
push 0
push 0
push 3
push 0
push 7
push SysReAllocString
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
or eax, 0xffffffff
cmp ebx, eax
je 0x40dd00
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], eax
mov eax, dword [0x45d020]
mov edx, dword [eax + 0xc]
mov ecx, 0x45d020
mov dword [ebp - 0x10], 0
call edx
add eax, 0x10
mov dword [ebp - 0x1c], eax
push 2
push 0
push 0xfffffffffffffffc
mov byte [ebp - 4], 1
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
call edi
test eax, eax
je 0x40dcd6
push 0
lea eax, [ebp - 0x10]
push eax
push 4
lea ecx, [ebp - 0x20]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40dcd6
cmp dword [ebp - 0x10], 4
jne 0x40dcd6
push 2
push 0
push 0xfffffffffffffff4
push ebx
call edi
test eax, eax
je 0x40dcd6
push 0
lea edx, [ebp - 0x10]
push edx
push 4
lea eax, [ebp - 0x18]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40dcd6
cmp dword [ebp - 0x10], 4
jne 0x40dcd6
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40dcd6
cmp dword [ebp - 0x18], 0
jbe 0x40dcd6
push 0
push 0
push eax
push ebx
call edi
test eax, eax
je 0x40dcd6
mov eax, dword [ebp - 0x18]
push 0
lea ecx, [ebp - 0x10]
push ecx
push eax
shr eax, 1
push eax
lea ecx, [ebp - 0x1c]
call fcn.00403620
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40dcd6
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0x10], eax
jne 0x40dcd6
shr eax, 1
push eax
lea ecx, [ebp - 0x1c]
call fcn.00402d50
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x1c]
call fcn.00402e10
mov dword [ebp - 0x24], 1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40dd00
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40dd23
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x80070057
call fcn.00403700
int3