Function at 0x40edd0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bc448
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
mov eax, dword [0x4e9688]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
lea eax, [edi + 0xc8]
push eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor eax, eax
mov dword [ebp - 4], eax
mov dword [edi], 0xffffffff
lea ebx, [edi + 4]
cmp esi, eax
je 0x40ee32
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40ee23
sub eax, edx
sar eax, 1
push eax
push esi
push ebx
call fcn.00425060
mov ecx, dword [edi + 0x80]
mov eax, dword [ecx]
mov dword [ecx], ecx
mov ecx, dword [edi + 0x80]
mov dword [ecx + 4], ecx
mov dword [edi + 0x84], 0
cmp eax, dword [edi + 0x80]
je 0x40ee75
nop
mov esi, dword [eax]
push eax
call fcn.00491276
add esp, 4
mov eax, esi
cmp esi, dword [edi + 0x80]
jne 0x40ee60
mov eax, dword [ebx]
cmp dword [eax - 0xc], 0
je 0x40eedd
xor esi, esi
mov dword [ebp - 0x14], esi
push esi
push 0x80
push 3
push esi
push 7
push SysReAllocString
push eax
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x40eefa
call fcn.004230e0
test eax, eax
jne 0x40ef19
push 0
lea edx, [ebp - 0x18]
push edx
push 0x64
lea ebx, [edi + 8]
push ebx
push esi
mov dword [ebp - 0x18], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40ef01
call fcn.004230e0
test eax, eax
je 0x40ef07
test esi, esi
je 0x40eedd
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, eax
mov dword [ebp - 0x14], esi
jmp 0x40eeab
cmp dword [ebp - 0x18], 0x64
jne 0x40eed2
mov ebx, dword [ebx]
cmp ebx, 1
jge 0x40ef36
test esi, esi
je 0x40ef19
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
jne 0x40efc0
xor eax, eax
cmp dword [edi + 0xc], eax
je 0x40ef9b
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x38], eax
mov eax, esi
lea esi, [ebp - 0x40]
mov byte [ebp - 4], 2
call fcn.00422d30
test eax, eax
jne 0x40ef93
mov ecx, dword [ebp - 0x3c]
cmp ecx, 0x64
jbe 0x40ef93
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x40ef93
add ecx, 0xffffff9c
lea edx, [eax + 0x64]
push edi
call fcn.0040f0c0
test eax, eax
je 0x40ef93
mov dword [edi], 2
call fcn.0040eff0
lea esi, [ebp - 0x14]
call fcn.00423100
mov edx, dword [ebp - 0x10]
push edx
jmp 0x40efd2
lea esi, [ebp - 0x40]
call fcn.0040eff0
lea esi, [ebp - 0x14]
call fcn.00423100
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea esi, [ebp - 0x14]
mov dword [edi], 1
call fcn.00423100
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret