Function at 0x4099e0
Capabilities:
Check for time delay via queryperformancecounter
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2ac
mov eax, dword [0x468600]
xor eax, esp
mov dword [esp + 0x2a8], eax
push ebx
push esi
mov esi, ecx
mov eax, dword [esi + 0x224]
mov ecx, 0x100000
mul ecx
push edi
xor ebx, ebx
push ecx
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], edx
xor edi, edi
mov dword [esp + 0x88], ebx
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x24], ebx
call fcn.0040b46c
add esp, 4
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x48], eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x409a6c
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x409a6c
fild qword [esp + 0x50]
fild qword [esp + 0x18]
fdivp st(1)
fmul qword [0x45e578]
jmp 0x409a84
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x38], eax
fild dword [esp + 0x38]
test eax, eax
jge 0x409a84
fadd qword [0x45e570]
fstp qword [esp + 0x50]
mov dword [esp + 0x34], ebx
fldz
fstp qword [esp + 0x70]
cmp ebx, dword [esp + 0x2c]
ja 0x409d9e
jb 0x409aa8
cmp edi, dword [esp + 0x28]
jae 0x409d9e
mov eax, esi
call fcn.00409830
test eax, eax
jne 0x409d9e
mov eax, dword [esp + 0x34]
inc eax
push eax
lea ecx, [esi + 8]
push ecx
lea edx, [esp + 0xb0]
push str._s_d.h2w
push edx
mov dword [esp + 0x48], eax
call fcn.00429b26
add esp, 0x10
push 0
push 0x20000000
push 1
push 0
push 3
push 0x40000000
lea eax, [esp + 0xc0]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
je 0x409d96
lea ecx, [esp + 0x90]
push ecx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x409b43
lea edx, [esp + 0x88]
push edx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x409b43
fild qword [esp + 0x88]
fild qword [esp + 0x90]
fdivp st(1)
fmul qword [0x45e578]
jmp 0x409b5b
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
test eax, eax
jge 0x409b5b
fadd qword [0x45e570]
fstp qword [esp + 0x78]
xor eax, eax
fldz
mov dword [esp + 0x3c], eax
fstp qword [esp + 0x48]
mov dword [esp + 0x40], eax
nop
cmp ebx, dword [esp + 0x2c]
ja 0x409d6a
jb 0x409b86
cmp edi, dword [esp + 0x28]
jae 0x409d6a
mov eax, esi
call fcn.00409830
test eax, eax
jne 0x409d6a
mov eax, dword [esp + 0x34]
push 0
cdq
push 0x400
push edx
push eax
call fcn.0042c720
mov ecx, eax
mov eax, dword [esp + 0x40]
mov esi, edx
cdq
push 0
add ecx, eax
push 0x100000
adc esi, edx
push esi
push ecx
call fcn.0042c720
push edx
push eax
mov eax, dword [esp + 0x4c]
call fcn.0040a3d0
add esp, 8
xor esi, esi
cmp ebx, dword [esp + 0x2c]
ja 0x409c39
jb 0x409be1
cmp edi, dword [esp + 0x28]
jae 0x409c39
mov eax, dword [esp + 0x24]
call fcn.00409830
test eax, eax
jne 0x409c39
mov ecx, dword [esp + 0x44]
push eax
lea edx, [esp + 0x60]
push edx
mov eax, 0x100000
sub eax, esi
push eax
mov eax, dword [esp + 0x1c]
lea edx, [esi + ecx]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x409dce
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x409dce
add esi, eax
add edi, eax
adc ebx, 0
mov dword [esp + 0x84], ebx
cmp esi, 0x100000
jb 0x409bd3
add dword [esp + 0x3c], esi
lea ecx, [esp + 0xa0]
push ecx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x409c79
lea edx, [esp + 0x98]
push edx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x409c79
fild qword [esp + 0x98]
fild qword [esp + 0xa0]
fdivp st(1)
fmul qword [0x45e578]
jmp 0x409c91
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
test eax, eax
jge 0x409c91
fadd qword [0x45e570]
fst qword [esp + 0x18]
fsub qword [esp + 0x78]
fsub qword [esp + 0x48]
fld1
fcom st(1)
fnstsw ax
test ah, 0x41
jne 0x409cac
fstp st(1)
jmp 0x409cae
fstp st(0)
mov eax, dword [esp + 0x24]
mov esi, dword [eax + 0x240]
test esi, esi
je 0x409cfc
mov ecx, dword [esp + 0x3c]
fild dword [esp + 0x3c]
test ecx, ecx
jge 0x409cce
fadd qword [0x45e570]
fmul qword [0x45e578]
fdivrp st(1)
call fcn.0042c6a6
mov ebx, dword [esp + 0x84]
push edx
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x30]
push edx
push eax
mov eax, dword [esi]
mov edx, dword [eax]
push ebx
push edi
push 1
mov ecx, esi
call edx
jmp 0x409cfe
fstp st(0)
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x409d2e
lea ecx, [esp + 0x68]
push ecx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x409d2e
fild qword [esp + 0x68]
fild qword [esp + 0x60]
fdivp st(1)
fmul qword [0x45e578]
jmp 0x409d46
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
test eax, eax
jge 0x409d46
fadd qword [0x45e570]
fsub qword [esp + 0x18]
mov eax, dword [esp + 0x40]
mov esi, dword [esp + 0x24]
inc eax
cmp eax, 0x400
fadd qword [esp + 0x48]
mov dword [esp + 0x40], eax
fstp qword [esp + 0x48]
jl 0x409b70
fld qword [esp + 0x48]
mov edx, dword [esp + 0x10]
fadd qword [esp + 0x70]
push edx
fstp qword [esp + 0x74]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x38]
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0x34], eax
jmp 0x409a92
mov dword [esp + 0x20], 3
lea ecx, [esp + 0x68]
push ecx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x409dd8
lea edx, [esp + 0x60]
push edx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x409dd8
fild qword [esp + 0x60]
fild qword [esp + 0x68]
fdivp st(1)
fmul qword [0x45e578]
jmp 0x409df0
mov dword [esp + 0x20], 5
jmp 0x409e41
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x38], eax
fild dword [esp + 0x38]
test eax, eax
jge 0x409df0
fadd qword [0x45e570]
mov eax, ebx
mov ecx, ebx
and eax, 0x7fffffff
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], eax
fild qword [esp + 0x18]
and ecx, 0x80000000
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], 0
fild qword [esp + 0x18]
fchs
faddp st(1)
fld qword [0x45e580]
fmul st(1), st(0)
fmulp st(1)
fmul qword [0x45e578]
fxch st(1)
fsub qword [esp + 0x50]
fsub qword [esp + 0x70]
fdivp st(1)
fstp qword [esi + 0x230]
mov eax, dword [esp + 0x10]
cmp eax, 0xffffffff
je 0x409e51
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x44]
test eax, eax
je 0x409e62
push eax
call fcn.0040b49b
add esp, 4
mov ecx, dword [esp + 0x2b4]
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00427f57
mov esp, ebp
pop ebp
ret