Function at 0x402330
Capabilities:
Check for time delay via gettickcount
Get file size
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x228
push esi
push edi
mov esi, ecx
xor eax, eax
mov byte [esp + 0x12c], 0
mov ecx, 0x40
lea edi, [esp + 0x12d]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x28], 0
mov ecx, 0x40
lea edi, [esp + 0x29]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0xc]
push eax
mov ecx, esi
mov dword [esp + 0x20], 0xc
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 1
call fcn.00401d50
test eax, eax
jne 0x402402
mov edx, dword [esi]
mov edi, dword [sym.imp.USER32.dll_LoadStringA]
push 0x103
lea ecx, [esp + 0x130]
push ecx
push 0x7b
push edx
call edi
test eax, eax
je 0x4023e3
mov ecx, dword [esi]
push 0x103
lea eax, [esp + 0x2c]
push eax
push 0x70
push ecx
call edi
test eax, eax
je 0x4023e3
mov ecx, dword [esi + 4]
push 1
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x134]
push eax
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 2
je 0x4023f5
lea edx, [esp + 0xc]
push edx
mov ecx, esi
call fcn.00401d50
test eax, eax
je 0x402392
jmp 0x402408
pop edi
xor eax, eax
pop esi
add esp, 0x228
ret 4
mov edi, dword [sym.imp.USER32.dll_LoadStringA]
mov ecx, dword [esp + 0x234]
push ebx
push ebp
push 0
push 0
push 3
lea eax, [esp + 0x30]
push eax
push 3
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x402486
mov eax, dword [esi]
push 0x103
lea edx, [esp + 0x138]
push edx
push 0x6e
push eax
call edi
test eax, eax
je 0x402477
mov edx, dword [esi]
push 0x103
lea ecx, [esp + 0x34]
push ecx
push 0x70
push edx
call edi
test eax, eax
je 0x402477
mov edx, dword [esi + 4]
push 0
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x13c]
push ecx
push edx
call dword [sym.imp.USER32.dll_MessageBoxA]
pop ebp
pop ebx
pop edi
xor eax, eax
pop esi
add esp, 0x228
ret 4
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
sub ebp, 0x200
shr ebp, 9
mov eax, ebp
shl eax, 9
push eax
mov dword [esp + 0x14], eax
call fcn.00403d84
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x14], edi
jne 0x402518
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x103
lea eax, [esp + 0x138]
push eax
push 0x71
mov ecx, dword [esi]
mov edi, dword [sym.imp.USER32.dll_LoadStringA]
push ecx
call edi
test eax, eax
je 0x402509
mov eax, dword [esi]
push 0x103
lea edx, [esp + 0x34]
push edx
push 0x70
push eax
call edi
test eax, eax
je 0x402509
mov eax, dword [esi + 4]
push 0
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x13c]
push edx
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
pop ebp
pop ebx
pop edi
xor eax, eax
pop esi
add esp, 0x228
ret 4
mov edx, dword [esp + 0x10]
push 0
lea ecx, [esp + 0x20]
push ecx
push edx
push edi
push ebx
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40255c
push edi
call fcn.00403d7f
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x103
lea eax, [esp + 0x138]
push eax
push 0x6e
jmp 0x4024cc
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0
push 3
lea ecx, [esp + 0x30]
push ecx
push 3
push 0x40000000
lea edx, [esi + 0x10c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
test eax, eax
mov dword [esp + 0x18], eax
jne 0x4025f1
mov ecx, dword [esi]
mov ebx, dword [sym.imp.USER32.dll_LoadStringA]
push 0x103
lea eax, [esp + 0x138]
push eax
push 0x74
push ecx
call ebx
test eax, eax
je 0x4025d6
mov eax, dword [esi]
push 0x103
lea edx, [esp + 0x34]
push edx
push 0x70
push eax
call ebx
test eax, eax
je 0x4025d6
mov eax, dword [esi + 4]
push 0
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x13c]
push edx
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
push edi
call fcn.00403d7f
add esp, 4
pop ebp
pop ebx
pop edi
mov eax, 1
pop esi
add esp, 0x228
ret 4
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esi + 4]
push 0
push 0
push 0x449
push ecx
mov dword [esp + 0x30], edi
call dword [sym.imp.USER32.dll_PostMessageA]
xor ebx, ebx
test ebp, ebp
jbe 0x4026ef
jmp 0x402620
mov eax, dword [esi + 0x214]
test eax, eax
jne 0x40272e
mov eax, ebp
sub eax, ebx
cmp eax, 0x10
mov dword [esp + 0x1c], 0
mov dword [esp + 0x10], 0x10
jge 0x40264b
mov dword [esp + 0x10], eax
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
push 0
lea edx, [esp + 0x20]
push edx
shl edi, 9
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x402751
mov eax, dword [esi + 0x328]
test eax, eax
je 0x402690
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [esi + 0x328]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x20]
add ebx, edx
add eax, edi
test ebx, ebx
mov dword [esp + 0x10], ebx
fild dword [esp + 0x10]
mov dword [esp + 0x20], eax
jge 0x4026b2
fadd dword [0x40d1dc]
test ebp, ebp
mov dword [esp + 0x10], ebp
fild dword [esp + 0x10]
jge 0x4026c4
fadd dword [0x40d1dc]
fdivp st(1)
fmul dword [0x40d1d8]
call fcn.00403ddc
push eax
mov eax, dword [esi + 4]
push 0
push 0x449
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
cmp ebx, ebp
mov edi, dword [esp + 0x14]
jb 0x402620
push edi
call fcn.00403d7f
mov edx, dword [esp + 0x1c]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov eax, dword [esi + 4]
push 0x64
push 0
push 0x449
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
pop ebp
pop ebx
pop edi
mov eax, 1
pop esi
add esp, 0x228
ret 4
push edi
call fcn.00403d7f
mov ecx, dword [esp + 0x1c]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebp
pop ebx
pop edi
xor eax, eax
pop esi
add esp, 0x228
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x14]
push edx
call fcn.00403d7f
mov eax, dword [esp + 0x1c]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esi]
mov edi, dword [sym.imp.USER32.dll_LoadStringA]
push 0x103
lea ecx, [esp + 0x138]
push ecx
push 0x73
push edx
call edi
test eax, eax
je 0x402509
mov ecx, dword [esi]
push 0x103
lea eax, [esp + 0x34]
push eax
push 0x70
push ecx
call edi
test eax, eax
je 0x402509
mov ecx, dword [esi + 4]
push 0
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x13c]
push eax
push ecx
jmp 0x402503