Function at 0x539c05
Capabilities:
Check for time delay via gettickcount
Read file on windows
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x244
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
push dword [ebp + 0x18]
mov eax, 0x104
push dword [ebp + 0x1c]
lea edi, [esp + 0x50]
push str.__s___exe__s
call fcn.005383cd
add esp, 0xc
push dword [ebp + 0x14]
mov eax, edi
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.005897cb
cmp dword [esp + 0x1c], 0xffffffff
jne 0x539c63
mov edi, dword [ebp + 8]
lea esi, [esp + 0x14]
mov dword [edi], 2
call fcn.00539776
mov eax, edi
jmp 0x539d34
xor esi, esi
push esi
lea eax, [esp + 0x3c]
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebx]
mov ecx, ebx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
call dword [eax]
test al, al
jne 0x539ed1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
jmp 0x539cea
lea esi, [esp + 0x14]
call fcn.005397c4
test al, al
jne 0x539cf4
mov eax, esi
push eax
call fcn.005397a0
test eax, eax
jne 0x539cf4
push 0xc8
push ecx
mov ecx, dword [esp + 0x1c]
mov eax, esp
mov dword [eax], ecx
mov eax, dword [ebx]
lea ecx, [esp + 0x4c]
push ecx
mov ecx, ebx
call dword [eax + 8]
cmp dword [eax], 1
je 0x539cf4
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, edi
cmp eax, 0x6ddd00
ja 0x539f0e
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
test al, al
je 0x539c9f
lea eax, [esp + 0x14]
call fcn.00539bf0
test al, al
jne 0x539eb3
lea esi, [esp + 0x14]
call fcn.005397c4
test al, al
jne 0x539eb3
push dword [esp + 0x2c]
mov ebx, dword [ebp + 8]
mov dword [ebx], 2
call fcn.005f858a
pop ecx
lea esi, [esp + 0x14]
call fcn.00539776
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
lea esi, [esp + 0x14]
call fcn.005397c4
test al, al
je 0x539ec1
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
xor esi, esi
push esi
lea eax, [esp + 0x44]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [esp + 0x2c]
mov byte [esp + 0x27], 0
call edi
cmp dword [esp + 0x40], 1
jne 0x539d16
cmp byte [esp + 0x13], 0x80
jb 0x539dd2
push esi
lea eax, [esp + 0x40]
push eax
push 2
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x2c]
mov dword [esp + 0x34], esi
call edi
movzx eax, word [esp + 0x20]
inc eax
push eax
lea esi, [esp + 0x30]
call fcn.00496cd5
movzx eax, word [esp + 0x20]
movzx esi, word [esp + 0x20]
mov edi, dword [esp + 0x2c]
add eax, eax
push eax
push edi
lea eax, [esp + 0x1c]
push eax
add esi, esi
call fcn.005397e2
cmp eax, esi
jne 0x539f2a
and word [esi + edi], 0
xor esi, esi
jmp 0x539dd6
mov edi, dword [esp + 0x2c]
movzx eax, byte [esp + 0x13]
cmp eax, 0x12
jg 0x539e5c
je 0x539e53
cmp eax, esi
jl 0x539eb3
cmp eax, 1
jle 0x539f46
push 2
pop esi
cmp eax, esi
je 0x539f3b
cmp eax, 0x10
je 0x539e18
cmp eax, 0x11
jne 0x539eb3
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x28]
jmp 0x539eb3
fld1
push 0
lea eax, [esp + 0x3c]
fstp qword [esp + 0x24]
push eax
push 8
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x38], 8
jne 0x539f30
fld qword [esp + 0x20]
mov eax, dword [ebx]
push ecx
push ecx
mov ecx, ebx
fstp qword [esp]
call dword [eax + 0x24]
jmp 0x539eb3
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x2c]
jmp 0x539eb3
sub eax, 0x80
je 0x539ea0
dec eax
je 0x539e8a
dec eax
je 0x539e7b
dec eax
jne 0x539eb3
cmp edi, esi
mov eax, edi
jne 0x539e77
mov eax, 0x631a7c
push 2
jmp 0x539e96
cmp edi, esi
mov eax, edi
jne 0x539e86
mov eax, 0x631a7c
push 1
jmp 0x539e96
cmp edi, esi
mov eax, edi
jne 0x539e95
mov eax, 0x631a7c
push esi
mov edx, dword [ebx]
push eax
mov ecx, ebx
call dword [edx + 0x20]
jmp 0x539eb3
cmp edi, esi
mov eax, edi
jne 0x539eab
mov eax, 0x631a7c
mov edx, dword [ebx]
push eax
mov ecx, ebx
call dword [edx + 0x1c]
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
test al, al
je 0x539d3d
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
test al, al
je 0x539c95
xor esi, esi
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
test al, al
je 0x539d16
lea eax, [esp + 0x14]
call fcn.00539bf0
test al, al
je 0x539faa
push esi
lea eax, [esp + 0x40]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [esp + 0x28]
mov byte [esp + 0x27], 0xff
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x539f88
cmp dword [esp + 0x14], 0xffffffff
je 0x539d16
push 1
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x539d16
push edi
jmp 0x539d1a
mov ebx, dword [ebp + 8]
mov dword [ebx], esi
push edi
jmp 0x539d23
mov ebx, dword [ebp + 8]
mov dword [ebx], 1
jmp 0x539f35
push dword [ebp + 0x14]
lea eax, [esp + 0x18]
push dword [ebp + 0x10]
push eax
call fcn.005397e2
cmp eax, dword [ebp + 0x14]
jne 0x539f2a
cmp byte [esp + 0x13], 1
mov ebx, dword [ebp + 8]
push edi
jne 0x539d1d
mov dword [ebx], esi
jmp 0x539d23
mov eax, dword [ebx]
push 0xc8
lea ecx, [esp + 0x40]
push ecx
mov ecx, ebx
call dword [eax + 4]
cmp esi, 5
je 0x539f97
inc esi
lea eax, [esp + 0x14]
call fcn.00539bf0
test al, al
jne 0x539f71
jmp 0x539faa
cmp dword [esp + 0x14], 0xffffffff
je 0x539faa
push 1
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ebx, dword [ebp + 8]
push dword [esp + 0x2c]
mov dword [ebx], 1
jmp 0x539d23