Function at 0x497d38
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, 6
push 0
push 0
dec ecx
jne 0x497d40
push ecx
push ebx
push esi
mov dword [ebp - 4], eax
mov esi, dword [0x4a2ad0]
xor eax, eax
push ebp
push 0x498149
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x117c]
test eax, eax
je 0x497d7b
cmp byte [eax], 0
je 0x49812e
mov eax, dword [ebp - 4]
call fcn.00497b98
test al, al
jne 0x49812e
push 1
mov eax, dword [ebp - 4]
add eax, 0x1160
push eax
call sub.kernel32.dll_InterlockedExchange
mov ebx, eax
xor edx, edx
push ebp
push 0x498127
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1150]
call fcn.004048d8
mov edx, eax
mov ecx, dword [ebx*4 + 0x4a27d8]
xor eax, eax
call fcn.004969d0
test ebx, ebx
je 0x497e26
mov eax, dword [esi]
cmp byte [eax + 0x3a6], 0
jne 0x497de3
mov eax, dword [esi]
cmp byte [eax + 0x3a5], 0
je 0x497ded
call fcn.00404070
jmp 0x49812e
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x117c]
test eax, eax
je 0x497e09
cmp byte [eax], 0
jne 0x497e09
call fcn.00404070
jmp 0x49812e
push 0
call sub.kernel32.dll_Sleep_1
push 1
mov eax, dword [ebp - 4]
add eax, 0x1160
push eax
call sub.kernel32.dll_InterlockedExchange
mov ebx, eax
test ebx, ebx
jne 0x497dcd
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1150]
call fcn.004048d8
mov edx, eax
mov ecx, 0x498164
xor eax, eax
call fcn.004969d0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1150]
call fcn.004048d8
mov esi, eax
test esi, esi
jle 0x497e71
mov ebx, 1
mov eax, dword [ebp - 4]
add eax, 0x1150
call fcn.00404b28
mov byte [eax + ebx - 1], 0
inc ebx
dec esi
jne 0x497e5b
mov eax, dword [ebp - 4]
add eax, 0x128
push eax
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1150]
call fcn.004048d8
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1150]
call fcn.00404ad0
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x112c]
push eax
call sub.kernel32.dll_ReadFile_1
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x497ee5
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x3e5
jne 0x497ee5
push 0xffffffffffffffff
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
add eax, 0x128
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x112c]
push eax
call sub.kernel32.dll_GetOverlappedResult
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
je 0x498000
cmp dword [ebp - 0xc], 0
je 0x497efb
mov eax, dword [ebp - 4]
call fcn.004977d8
test byte [0x4a525c], 2
je 0x497f2b
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1150]
mov ecx, dword [ebp - 0xc]
mov edx, 1
call fcn.00404b30
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
mov al, 1
call fcn.004969d0
mov esi, dword [ebp - 0xc]
test esi, esi
jle 0x4980d8
mov ebx, 1
mov byte [ebp - 5], 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1150]
xor edx, edx
mov dl, byte [eax + ebx - 1]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1124]
call fcn.0049917c
mov eax, dword [ebp - 4]
cmp byte [eax + 0x111d], 0
je 0x497fba
mov eax, dword [ebp - 4]
cmp word [eax + 0x1142], 0
je 0x497fba
push 0x498174
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1150]
mov dl, byte [eax + ebx - 1]
lea ecx, [ebp - 0x18]
mov eax, dword [ebp - 4]
call fcn.00496be4
push dword [ebp - 0x18]
push 0x498180
lea eax, [ebp - 0x14]
mov edx, 3
call fcn.00404998
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1134]
mov ecx, dword [eax]
call dword [ecx + 0x38]
jmp 0x497ff3
mov eax, dword [ebp - 4]
cmp byte [eax + 0x1164], 0
je 0x497ff3
push 0
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1150]
mov dl, byte [eax + ebx - 1]
lea ecx, [ebp - 0x1c]
mov eax, dword [ebp - 4]
call fcn.00496be4
mov eax, dword [ebp - 0x1c]
push eax
call fcn.00461fa8
xor ecx, ecx
pop edx
call fcn.0046182c
inc ebx
dec esi
jne 0x497f3b
jmp 0x4980d8
call sub.kernel32.dll_GetLastError_1
lea edx, [ebp - 0x24]
call fcn.0040b7c4
mov ecx, dword [ebp - 0x24]
lea eax, [ebp - 0x20]
mov edx, 0x49818c
call fcn.00404924
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 4]
call fcn.00496b50
call sub.kernel32.dll_GetLastError_1
lea edx, [ebp - 0x28]
call fcn.0040b7c4
mov eax, dword [ebp - 0x28]
push eax
call sub.kernel32.dll_GetLastError_1
mov edx, eax
mov al, 2
pop ecx
call fcn.004969d0
mov eax, dword [ebp - 4]
add eax, 0x14
push eax
mov eax, dword [ebp - 4]
add eax, 0x68
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x112c]
push eax
call sub.kernel32.dll_ClearCommError
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x498097
call sub.kernel32.dll_GetLastError_1
lea edx, [ebp - 0x30]
call fcn.0040b7c4
mov ecx, dword [ebp - 0x30]
lea eax, [ebp - 0x2c]
mov edx, 0x4981b0
call fcn.00404924
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.00496b50
call sub.kernel32.dll_GetLastError_1
lea edx, [ebp - 0x34]
call fcn.0040b7c4
mov ecx, dword [ebp - 0x34]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x68]
mov al, 2
call fcn.004969d0
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x18]
mov ecx, 0x4981dc
mov al, 2
call fcn.004969d0
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x1c]
mov ecx, 0x4981f4
mov al, 2
call fcn.004969d0
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x1134]
test ebx, ebx
je 0x49810e
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
je 0x49810e
push 0
push 0
push 0x400
mov eax, dword [0x4a2b9c]
mov eax, dword [eax]
mov eax, dword [eax + 0x44]
call fcn.00445378
push eax
call sub.user32.dll_PostMessageA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x49812e
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x1160], edx
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x498150
lea eax, [ebp - 0x34]
mov edx, 0xa
call fcn.00404628
ret