Function at 0x404a1d
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x442bff
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x45e070]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp byte [esi + 0x88], 0
je 0x4048eb
push dword [esi + 0x9c]
mov dword [esi + 0x84], 1
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x84]
dec eax
cmp eax, 9
ja case.default.0x4048fb
jmp dword [eax*4 + 0x404e08]
mov eax, dword [esi + 0x40]
test eax, eax
je 0x404917
push eax
call dword [sym.imp.KERNEL32.dll_UnregisterWait]
mov dword [esi + 0x40], 0
mov eax, dword [esi + 0x3c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x40492e
push eax
call edi
mov dword [esi + 0x3c], 0
mov eax, dword [esi + 0x9c]
test eax, eax
je 0x404df4
push eax
call edi
mov dword [esi + 0x9c], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [esi + 0x9c]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
test eax, eax
jne 0x40497c
push dword [esi + 0x9c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp case.default.0x4048fb
lea eax, [esi + 0x8c]
push eax
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x40496b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
je 0x4049c0
cmp eax, 0x3e5
jne 0x40496b
mov dword [esi + 0x84], 3
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x84], 4
jmp 0x404dda
push 0
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
lea eax, [esi + 0x8c]
push eax
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
setne bl
test eax, eax
je 0x4049f9
xor eax, eax
jmp 0x4049ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
test bl, bl
jne 0x4049c0
cmp eax, 0x3e4
je 0x404df4
mov dword [esi + 0x84], 0xa
jmp 0x404dda
push 0x2c
lea edi, [esi + 0xa0]
mov dword [ebp - 0x10], 0
push 0
push edi
call fcn.00427af0
add esp, 0xc
lea eax, [esi + 0x8c]
push eax
lea eax, [ebp - 0x10]
push eax
push 0x2c
push edi
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
setne bl
test eax, eax
je 0x404a5b
xor eax, eax
jmp 0x404a61
call dword [sym.imp.KERNEL32.dll_GetLastError]
test bl, bl
jne 0x404a6c
cmp eax, 0x3e5
jne 0x404a0e
mov dword [esi + 0x84], 5
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
lea eax, [esi + 0x8c]
push eax
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x404a0e
cmp dword [ebp - 0x10], 0x2c
jne 0x404a0e
mov dword [esi + 0x84], 6
jmp 0x404dda
mov eax, dword [esi + 0xa0]
cmp eax, 4
je 0x404b13
cmp eax, 1
jne 0x404a0e
cmp dword [esi + 0xa4], 0
je 0x404a0e
cmp dword [esi + 0xac], 0
je 0x404a0e
cmp dword [esi + 0xb0], 0
je 0x404a0e
cmp dword [esi + 0xb4], 0
je 0x404a0e
cmp eax, 4
jne 0x404b3b
mov eax, dword [esi + 0x60]
test eax, eax
je 0x404a0e
push dword [esi + 0xa4]
push dword [esi + 0x64]
call eax
add esp, 8
mov dword [esi + 0x84], 0xa
jmp 0x404dda
push 0x44
call fcn.0040fce7
add esp, 4
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x404b84
lea ecx, [esi + 0xb8]
push ecx
push dword [esi + 0xb4]
mov ecx, eax
push dword [esi + 0xb0]
push dword [esi + 0xac]
push dword [esi + 0xa8]
push dword [esi + 0xa4]
push esi
call fcn.00406a40
mov edi, eax
jmp 0x404b86
xor edi, edi
mov dword [ebp - 0x10], edi
mov ecx, edi
mov dword [ebp - 4], 1
call fcn.00406bf0
test al, al
jne 0x404beb
push dword [esi + 0x9c]
mov dword [esi + 0x84], 0xa
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x404bbf
mov dword [esi + 0x84], 1
test edi, edi
je 0x404df4
mov ecx, edi
call fcn.00406ad0
push 0x44
push edi
call fcn.0040fd67
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
mov ecx, esi
call fcn.00405170
test al, al
jne 0x404c02
push 0xa
mov ecx, esi
call fcn.00404860
jmp 0x404bbf
mov dword [esi + 0xcc], edi
mov dword [esi + 0x84], 7
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
lea eax, [esi + 0x8c]
push eax
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
push dword [esi + 0x9c]
test eax, eax
je 0x404c5a
mov dword [esi + 0x84], 8
jmp 0x404de0
mov dword [esi + 0x84], 0xa
jmp 0x404de0
lea eax, [esi + 0x8c]
mov dword [ebp - 0x10], 0
push eax
lea eax, [ebp - 0x10]
push eax
push 0x2c
lea eax, [esi + 0xa0]
push eax
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
setne bl
test eax, eax
je 0x404c9a
xor eax, eax
jmp 0x404ca0
call dword [sym.imp.KERNEL32.dll_GetLastError]
test bl, bl
je 0x404cb3
mov dword [esi + 0x84], 9
jmp 0x404dda
cmp eax, 0x3e5
jne 0x404a0e
mov dword [esi + 0x84], 9
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
lea eax, [esi + 0x8c]
push eax
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x404a0e
cmp dword [esi + 0x48], 0
je 0x404a0e
push esi
mov dword [ebp - 0x18], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 0x14], 1
mov ecx, dword [esi + 0x18]
mov dword [ebp - 4], 2
mov eax, dword [ecx]
cmp eax, ecx
je 0x404d5d
mov edx, dword [esi + 0xcc]
nop dword [eax]
cmp edx, dword [eax + 8]
je 0x404d51
mov eax, dword [eax]
cmp eax, ecx
jne 0x404d30
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [esi + 0x84], 0xa
jmp 0x404dda
mov eax, dword [esi + 0x48]
push edx
push dword [esi + 0x4c]
call eax
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [esi + 0x84], 0xa
jmp 0x404dda
push dword [esi + 0x9c]
mov dword [esi + 0xcc], 0
mov dword [esi + 0x8c], 0
mov dword [esi + 0x90], 0
mov dword [esi + 0x98], 0
mov dword [esi + 0x94], 0
call dword [sym.imp.KERNEL32.dll_ResetEvent]
test eax, eax
je 0x40496b
push dword [esi + 0x3c]
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
test eax, eax
je 0x40496b
cmp byte [esi + 0x88], 0
jne 0x404df4
mov dword [esi + 0x84], 2
push dword [esi + 0x9c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x404df4
mov dword [esi + 0x84], 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret