Function at 0x409640
Capabilities:
Create thread
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x2e
push 0
push 0
dec ecx
jne 0x409648
push ecx
push ebx
push esi
push edi
mov edi, 0x4129c4
xor eax, eax
push ebp
push 0x409bb0
push dword fs:[eax]
mov dword fs:[eax], esp
mov ebx, dword [0x41120c]
mov ebx, dword [ebx + 0x18]
test ebx, ebx
je 0x409685
mov eax, dword [0x41120c]
call sub.kernel32.dll_GetACP
cmp ebx, eax
jne 0x409b8a
mov eax, 0x409bc8
call fcn.00404b00
mov edx, 0x4129ac
xor eax, eax
call fcn.00402724
xor ebx, ebx
lea edx, [ebp - 0x144]
xor eax, eax
call fcn.00402724
mov eax, dword [ebp - 0x144]
mov edx, 0x40
call fcn.00404a10
mov esi, eax
cmp esi, 0xffffffff
je 0x4097c8
push 0
lea eax, [ebp - 0x10]
push eax
push pe_nt_image_headers32
lea eax, [ebp - 0x124]
push eax
push esi
call sub.kernel32.dll_ReadFile
test eax, eax
je 0x4097c2
cmp dword [ebp - 0x10], 0x100
jne 0x4097c2
mov eax, 0x409bd4
call fcn.00404b00
lea eax, [ebp - 0xf4]
mov eax, dword [eax]
mov dword [0x4129c8], eax
push 0x1000000
push 0
call sub.kernel32.dll_GlobalAlloc
mov dword [0x4129b0], eax
cmp dword [0x4129c8], 0x1000000
jg 0x4097c2
mov eax, 0x409be0
call fcn.00404b00
mov eax, dword [0x4129c8]
call fcn.00402494
mov dword [0x4129b4], eax
xor ecx, ecx
xor edx, edx
mov eax, esi
call fcn.00404854
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [0x4129c8]
push eax
mov eax, dword [0x4129b4]
push eax
push esi
call sub.kernel32.dll_ReadFile
push 0x409bf0
lea edx, [ebp - 0x14c]
mov eax, dword [ebp - 0x10]
call fcn.0040477c
push dword [ebp - 0x14c]
push 0x409c00
lea edx, [ebp - 0x150]
mov eax, dword [0x4129c8]
call fcn.0040477c
push dword [ebp - 0x150]
lea eax, [ebp - 0x148]
mov edx, 4
call fcn.0040347c
mov eax, dword [ebp - 0x148]
call fcn.00404b00
mov eax, dword [ebp - 0x10]
cmp eax, dword [0x4129c8]
jne 0x4097c2
mov bl, 1
push esi
call sub.kernel32.dll_CloseHandle
test bl, bl
je 0x409b8a
lea edx, [ebp - 0x158]
mov eax, dword [0x4129c8]
call fcn.0040477c
mov ecx, dword [ebp - 0x158]
lea eax, [ebp - 0x154]
mov edx, 0x409c0c
call fcn.00403408
mov eax, dword [ebp - 0x154]
call fcn.00404b00
push 0x4129bc
mov ecx, 0x4129b8
mov edx, dword [0x4129c8]
mov eax, dword [0x4129b4]
call fcn.00405364
test al, al
je 0x409b8a
mov eax, 0x409c18
call fcn.00404b00
call fcn.004100c8
mov ebx, eax
test bl, bl
je 0x40989c
call fcn.004026c4
dec eax
jne 0x4098af
lea edx, [ebp - 0x15c]
mov eax, 1
call fcn.00402724
mov eax, dword [ebp - 0x15c]
mov edx, dword [0x411208]
mov edx, dword [edx]
call fcn.00403508
jne 0x4098af
mov eax, dword [edi]
mov dword [eax + 4], 1
jmp 0x409877
push 0x64
call sub.kernel32.dll_Sleep
mov eax, dword [edi]
cmp dword [eax + 8], 1
jne 0x409870
push 0xc8
call sub.kernel32.dll_Sleep
call fcn.0040f768
xor ebx, ebx
call fcn.00409514
call fcn.00408e1c
jmp 0x4098af
mov eax, dword [edi]
mov dword [eax + 0xc], 1
call fcn.00409514
call fcn.00408e1c
call fcn.004087a4
lea eax, [ebp - 0x24]
push eax
call sub.kernel32.dll_GetLocalTime
mov eax, 0x409c24
call fcn.00404b00
mov edx, dword [0x41120c]
mov edx, dword [edx + 0xc]
movzx eax, word [ebp - 0x24]
cmp edx, eax
jl 0x409b8a
mov ecx, dword [0x41120c]
cmp edx, eax
jne 0x409918
mov edx, dword [0x41120c]
mov edx, dword [edx + 0x10]
movzx eax, word [ebp - 0x22]
cmp edx, eax
jl 0x409b8a
mov ecx, dword [0x41120c]
cmp edx, eax
jne 0x409918
movzx eax, word [ebp - 0x1e]
mov edx, dword [0x41120c]
cmp eax, dword [edx + 0x14]
jge 0x409b8a
mov eax, 0x409c30
call fcn.00404b00
test bl, bl
jne 0x409b8a
mov eax, dword [0x41120c]
mov eax, dword [eax + 0x20]
mov edx, dword [edi]
mov dword [edx + 0x14], eax
lea eax, [ebp - 0x14]
mov edx, 0x409c3c
call fcn.00403214
mov eax, dword [ebp - 0x14]
call fcn.00409498
test eax, eax
jne 0x409b8a
mov eax, dword [ebp - 0x14]
call fcn.004035bc
mov edx, eax
lea eax, [ebp - 0x164]
call fcn.00403374
mov eax, dword [ebp - 0x164]
lea edx, [ebp - 0x160]
call fcn.00407a34
mov eax, dword [ebp - 0x160]
call fcn.004035bc
mov edx, eax
mov eax, dword [edi]
add eax, 0x114
mov ecx, 0x1fa0
call fcn.00404734
lea eax, [ebp - 0x16c]
mov edx, 0x40bf08
call fcn.00403374
mov eax, dword [ebp - 0x16c]
lea edx, [ebp - 0x168]
call fcn.00407984
mov eax, dword [ebp - 0x168]
call fcn.004035bc
mov edx, eax
mov eax, dword [edi]
add eax, 0x20b4
mov ecx, 0x1fa0
call fcn.00404734
lea edx, [ebp - 0x174]
mov eax, dword [0x41120c]
mov eax, dword [eax + 0x1c]
call fcn.0040477c
mov ecx, dword [ebp - 0x174]
lea eax, [ebp - 0x170]
mov edx, 0x40e610
call fcn.00403408
mov eax, dword [ebp - 0x170]
call fcn.00404b00
call fcn.00409514
mov byte [0x41f1fc], 0
mov byte [0x41f1ff], 0
lea eax, [ebp - 4]
push eax
push 0
push 0
push 0x40fdb8
push 0
push 0
call sub.kernel32.dll_CreateThread
mov byte [0x41f1fd], 1
mov eax, dword [0x41120c]
test byte [eax + 0x1c], 1
je 0x409a6d
push 0x7530
call sub.kernel32.dll_Sleep
mov byte [0x41f1fd], 0
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x40ff84
push 0
push 0
call sub.kernel32.dll_CreateThread
mov byte [0x41f1fe], 1
mov eax, dword [0x41120c]
test byte [eax + 0x1c], 2
je 0x409b29
mov byte [0x41f1fe], 0
lea eax, [ebp - 0xc]
push eax
push 0
push 0
push 0x40ff24
push 0
push 0
call sub.kernel32.dll_CreateThread
jmp 0x409b29
mov eax, dword [edi]
cmp dword [eax + 4], 0
je 0x409ae9
push 0x7d0
call sub.kernel32.dll_Sleep
cmp byte [0x41f1ff], 0
je 0x409b5c
mov eax, dword [0x41f200]
call fcn.004035bc
push eax
mov ecx, 0x40e614
mov edx, 0x40e614
mov al, 1
call fcn.00406664
mov byte [0x41f1ff], 0
jmp 0x409b5c
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x140]
push eax
call sub.user32.dll_PeekMessageA
test eax, eax
je 0x409b22
cmp dword [ebp - 0x13c], 0x10
je 0x409b5c
lea eax, [ebp - 0x140]
push eax
call sub.user32.dll_TranslateMessage
lea eax, [ebp - 0x140]
push eax
call sub.user32.dll_DispatchMessageA
push 0x64
call sub.kernel32.dll_Sleep
cmp byte [0x41f1fc], 0
je 0x409aa5
cmp byte [0x41f1fd], 0
je 0x409aa5
cmp byte [0x41f1fe], 0
je 0x409aa5
mov eax, dword [edi]
cmp dword [eax + 0x10], 0
je 0x409aa5
cmp byte [0x41f1ff], 0
je 0x409b81
mov eax, dword [0x41f200]
call fcn.004035bc
push eax
mov ecx, 0x40e614
mov edx, 0x40e614
mov al, 1
call fcn.00406664
mov eax, dword [edi]
mov dword [eax + 8], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409bb7
lea eax, [ebp - 0x174]
mov edx, 0xd
call fcn.004031a0
lea eax, [ebp - 0x14]
call fcn.0040317c
ret