Function at 0x41cc10
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x24c
xor eax, eax
push ebx
mov dword [esp + 8], eax
push ebp
mov ebx, dword [esp + 0x268]
push esi
mov dword [esp + 0x14], eax
push edi
xor ebp, ebp
mov dword [esp + 0x1c], eax
mov ecx, 6
lea edi, [esp + 0x44]
mov dword [esp + 0x40], ebp
mov dword [esp + 0x10], ebp
rep stosd dword es:[edi], eax
xor ecx, ecx
xor edi, edi
mov dword [esp + 0x30], ecx
cmp ebx, 0xffffffff
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x34], ecx
jne 0x41cc7e
mov esi, dword [esp + 0x260]
push 1
push esi
call dword [sym.imp.KERNEL32.dll_SetCommMask]
test eax, eax
jne 0x41ccca
pop edi
pop esi
or eax, ebx
pop ebp
pop ebx
add esp, 0x24c
ret
mov esi, dword [esp + 0x260]
lea edx, [esp + 0x40]
push edx
push esi
mov dword [esp + 0x48], 0x1c
call dword [sym.imp.KERNEL32.dll_GetCommState]
test eax, eax
je 0x41ced2
lea eax, [esp + 0x40]
mov byte [esp + 0x59], bl
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetCommState]
test eax, eax
je 0x41ced2
push 2
push esi
call dword [sym.imp.KERNEL32.dll_SetCommMask]
test eax, eax
je 0x41ced2
cmp dword [esp + 0x26c], ebp
jbe 0x41ce12
mov ebx, dword [esp + 0x274]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
test eax, eax
mov dword [esp + 0x20], eax
je 0x41ce1f
lea ecx, [esp + 0x10]
lea edx, [esp + 0x28]
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WaitCommEvent]
test eax, eax
jne 0x41cd59
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x41ce41
mov eax, dword [esp + 0x20]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x41ce48
test eax, eax
jne 0x41cd59
lea ecx, [esp + 0x3c]
push eax
lea edx, [esp + 0x14]
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x41ce63
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x38]
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ClearCommError]
test eax, eax
je 0x41cecb
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x26c]
cmp ecx, eax
jae 0x41cd83
mov eax, ecx
cmp eax, 1
jae 0x41cd8f
mov edx, dword [esp + 0x20]
push edx
jmp 0x41ce03
lea ecx, [esp + 0x10]
lea edx, [esp + 0x24]
push ecx
push edx
push eax
mov eax, dword [esp + 0x270]
lea ecx, [edi + eax]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x41cdd5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x41ce78
mov edx, dword [esp + 0x20]
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x41ceb8
mov eax, dword [esp + 0x24]
cmp eax, 1
jae 0x41cde5
mov eax, dword [esp + 0x20]
push eax
jmp 0x41ce03
add edi, eax
mov eax, dword [esp + 0x28]
cmp eax, 2
jne 0x41cdfe
cmp dword [esp + 0x270], 0xffffffff
jne 0x41cee0
mov ecx, dword [esp + 0x20]
push ecx
call ebp
cmp edi, dword [esp + 0x26c]
jb 0x41cce4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24c
ret
mov edx, dword [0x4f0c80]
push str.ERROR:_Creating_Event
push edx
call fcn.00422690
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24c
ret
push str.ERROR:_WaitComm
jmp 0x41cebd
push esi
call dword [sym.imp.KERNEL32.dll_CancelIo]
mov edx, dword [esp + 0x20]
push edx
call ebp
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24c
ret
mov eax, dword [esp + 0x20]
push eax
call ebp
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x24c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x60]
push str.ERROR:_ReadFile__lu
push edx
call dword [sym.imp.MSVCRT.dll_swprintf]
mov ecx, dword [0x4f0c80]
lea eax, [esp + 0x68]
push eax
push ecx
call fcn.00422690
mov edx, dword [esp + 0x34]
add esp, 0x14
push edx
call ebp
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x24c
ret
push str.ERROR:_Timeout_Wait_on_ReadFile
mov eax, dword [0x4f0c80]
push eax
call fcn.00422690
add esp, 8
mov ecx, dword [esp + 0x20]
push ecx
call ebp
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x24c
ret
mov edx, dword [esp + 0x20]
push edx
call ebp
mov eax, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24c
ret