Function at 0x40e5dc
Capabilities:
Check for time delay via gettickcount
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
mov ebx, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 4], eax
xor edx, edx
mov dword [ebp - 8], edx
xor ecx, ecx
mov dword [ebp - 0x10], ecx
call sub.KERNEL32.dll_GetTickCount
mov dword [ebp - 0x14], eax
jmp 0x40e879
mov eax, dword [ebx + 0x12012]
inc eax
and eax, 0xff
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0xc]
cmp edx, dword [ebx + 0x1200e]
jne 0x40e645
mov cx, word [ebx + 4]
push ecx
push ebx
call fcn.0040dea9
add esp, 8
mov edi, eax
inc eax
jne 0x40e63d
mov dword [ebp - 4], 0xffffffff
jmp 0x40e89e
test edi, edi
je 0x40e879
mov eax, dword [ebx + 0x1000a]
sub eax, dword [ebx + 0x10006]
and eax, 0xffff
mov edx, 0x10000
sub edx, eax
dec edx
mov eax, edx
mov edx, 0x10000
sub edx, dword [ebx + 0x1000a]
mov esi, dword [ebp + 0x10]
test eax, eax
jne 0x40e69e
mov ax, word [ebx + 4]
push eax
push ebx
call fcn.0040dea9
add esp, 8
mov edi, eax
inc eax
jne 0x40e691
mov dword [ebp - 4], 0xffffffff
jmp 0x40e89e
test edi, edi
je 0x40e879
jmp 0x40e879
cmp eax, esi
jge 0x40e6a4
mov esi, eax
cmp edx, esi
jge 0x40e6cc
mov esi, edx
jmp 0x40e6cc
push 0
push ebx
call fcn.0040dea9
add esp, 8
mov edi, eax
inc eax
jne 0x40e6c8
mov dword [ebp - 4], 0xffffffff
jmp 0x40e89e
test edi, edi
je 0x40e6da
mov edx, dword [ebx + 0x1200e]
cmp edx, dword [ebx + 0x12012]
jne 0x40e6ac
mov edi, dword [ebx + 0x12012]
shl edi, 5
add edi, ebx
add edi, 0x1000e
mov eax, dword [ebx + 0x1000a]
mov dword [edi + 4], eax
test esi, esi
jle 0x40e710
push esi
push dword [ebp + 0xc]
mov edx, dword [ebx + 0x1000a]
add edx, ebx
add edx, 6
push edx
call fcn.00435928
add esp, 0xc
mov ecx, dword [ebx + 0x1000a]
add ecx, esi
and ecx, 0xffff
mov dword [ebx + 0x1000a], ecx
mov eax, dword [ebx + 0x1000a]
mov dword [edi + 8], eax
mov edx, dword [ebp - 0xc]
mov dword [ebx + 0x12012], edx
push 0xb028bf
push esi
push dword [ebp + 0xc]
push 0xb028a6
call fcn.0040dbda
add esp, 0x10
add dword [ebp - 4], esi
add dword [ebp + 0xc], esi
sub dword [ebp + 0x10], esi
push 0x14
push 0
lea ecx, [edi + 0xc]
push ecx
call fcn.00435974
add esp, 0xc
push 0
push 0
push 1
push 0
call sub.KERNEL32.dll_CreateEventA
mov dword [edi + 0x1c], eax
cmp dword [edi + 0x1c], 0
jne 0x40e783
or eax, 0xffffffff
jmp 0x40e8a1
call sub.KERNEL32.dll_GetTickCount
mov dword [edi], eax
xor edx, edx
mov dword [ebp - 0x10], edx
lea ecx, [edi + 0xc]
push ecx
lea eax, [ebp - 0x10]
push eax
push esi
mov edx, dword [edi + 4]
add edx, ebx
add edx, 6
push edx
push dword [ebx]
call sub.KERNEL32.dll_WriteFile
test eax, eax
je 0x40e7ce
mov ecx, dword [ebp - 0x10]
cmp ecx, esi
je 0x40e85d
push 0xb028c1
call fcn.0040db93
pop ecx
mov dword [ebp - 0x10], 0xffffffff
jmp 0x40e85d
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x3e5
je 0x40e879
call fcn.0040dbab
push 0
lea eax, [ebp - 8]
push eax
push dword [ebx]
call sub.KERNEL32.dll_ClearCommError
test eax, eax
jne 0x40e7f9
call fcn.0040dbab
test byte [ebp - 8], 8
je 0x40e80c
push 0xb028d6
call fcn.0040db93
pop ecx
jmp 0x40e856
test byte [ebp - 8], 2
je 0x40e81f
push 0xb028ee
call fcn.0040db93
pop ecx
jmp 0x40e856
test byte [ebp - 8], 4
je 0x40e832
push 0xb02900
call fcn.0040db93
pop ecx
jmp 0x40e856
test byte [ebp - 8], 0x10
je 0x40e845
push 0xb02917
call fcn.0040db93
pop ecx
jmp 0x40e856
cmp dword [ebp - 8], 0
je 0x40e856
push 0xb02927
call fcn.0040db93
pop ecx
mov dword [ebp - 0x10], 0xffffffff
push dword [edi + 0x1c]
call sub.KERNEL32.dll_CloseHandle
xor edx, edx
mov dword [edi + 0x1c], edx
cmp dword [ebp - 0x10], 0xffffffff
jne 0x40e879
mov dword [ebp - 4], 0xffffffff
jmp 0x40e89e
cmp dword [ebp + 0x10], 0
jle 0x40e89e
call sub.KERNEL32.dll_GetTickCount
sub eax, dword [ebp - 0x14]
movsx ecx, word [ebx + 4]
cmp eax, ecx
jb 0x40e604
cmp word [ebx + 4], 0
je 0x40e604
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret