Function at 0x412150
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x94
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x34], 1
mov dword [ebp - 0x38], 1
mov eax, dword [str.ABDHLPTYhr]
mov dword [ebp - 0x4d], eax
mov eax, dword [0x421a54]
mov dword [ebp - 0x49], eax
mov eax, dword [0x421a58]
mov dword [ebp - 0x45], eax
mov bl, byte [0x421a5c]
mov byte [ebp - 0x41], bl
mov dword [ebp - 0x54], 0xd
mov dword [ebp - 0x1c], 1
mov eax, dword [0x424480]
mov ecx, esp
mov dword [ecx], eax
call sub.cvirte.dll_FlushInQ
sub esp, 4
lea ecx, [0x486d78]
lea edx, [0x421a5d]
mov dword [ebp - 0x28], 0
mov dword [esp], ecx
mov dword [esp + 4], edx
mov dword [ebp - 0x70], eax
call sub.cvirte.dll_fopen
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x30], 0
cmp dword [0x486974], 1
jne 0x412208
mov al, 1
mov ecx, dword [ebp - 0x10]
movzx ecx, byte [ecx + 2]
cmp ecx, 0
mov byte [ebp - 0x71], al
je 0x412245
mov al, 0
cmp dword [0x486974], 1
mov byte [ebp - 0x72], al
jne 0x41223f
mov al, 0
mov ecx, dword [ebp - 0x10]
movzx ecx, byte [ecx + 2]
cmp ecx, 0
mov byte [ebp - 0x72], al
jle 0x41223f
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x10]
movzx ecx, word [ecx + 0x26]
cmp eax, ecx
setl dl
mov byte [ebp - 0x72], dl
mov al, byte [ebp - 0x72]
mov byte [ebp - 0x71], al
mov al, byte [ebp - 0x71]
test al, 1
jne 0x412251
jmp 0x41241d
mov eax, dword [0x424480]
mov ecx, esp
mov dword [ecx], eax
call sub.cvirte.dll_GetInQLen
sub esp, 4
mov dword [ebp - 0x20], eax
call sub.cvirte.dll_Timer_FLTREG_
fstp qword [ebp - 0x60]
mov dword [ebp - 0x64], 0
cmp dword [ebp - 0x20], 0
jne 0x4122d8
mov eax, dword [0x424480]
mov ecx, esp
mov dword [ecx], eax
call sub.cvirte.dll_GetInQLen
sub esp, 4
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x38]
mov ecx, esp
mov dword [ebp - 0x68], eax
fild dword [ebp - 0x68]
fstp qword [ecx]
call sub.cvirte.dll_Delay
sub esp, 8
call sub.cvirte.dll_Timer_FLTREG_
fld qword [ebp - 0x60]
fsubp st(1)
mov eax, dword [ebp - 0x10]
fld qword [eax + 0x228]
fadd st(0), st(0)
fxch st(1)
fucompp
fnstsw ax
mov cx, ax
mov dl, ch
mov ah, dl
sahf
jbe 0x4122d6
jmp 0x4122cd
mov dword [ebp - 0x64], 1
jmp 0x4122d8
jmp 0x412274
cmp dword [ebp - 0x64], 0
jne 0x4123ea
mov eax, dword [0x424480]
mov ecx, esp
mov dword [ecx], eax
call sub.cvirte.dll_GetInQLen
sub esp, 4
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
sub eax, dword [ebp - 0x20]
cmp eax, 0
jle 0x412345
mov eax, dword [0x424480]
mov ecx, esp
mov dword [ecx], eax
call sub.cvirte.dll_GetInQLen
sub esp, 4
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x6c], eax
fild dword [ebp - 0x6c]
mov eax, esp
fstp qword [eax]
call sub.cvirte.dll_Delay
sub esp, 8
mov eax, dword [0x424480]
mov ecx, esp
mov dword [ecx], eax
call sub.cvirte.dll_GetInQLen
sub esp, 4
mov dword [ebp - 0x24], eax
jmp 0x4122f9
mov eax, dword [0x424480]
mov ecx, esp
mov dword [ecx], eax
call sub.cvirte.dll_GetInQLen
sub esp, 4
mov dword [ebp - 0x20], eax
mov eax, dword [0x424480]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x20]
mov esi, esp
mov dword [esi + 8], edx
mov dword [esi + 4], ecx
mov dword [esi], eax
call sub.cvirte.dll_ComRd
sub esp, 0xc
mov ecx, 1
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x3c]
mov dword [esp], eax
mov dword [esp + 4], 1
mov dword [esp + 8], edx
mov dword [esp + 0xc], esi
mov dword [ebp - 0x78], ecx
call sub.cvirte.dll_fwrite
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x20]
mov edi, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x1c]
mov dword [esp], ecx
mov dword [esp + 4], edx
mov dword [esp + 8], esi
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], ebx
mov dword [ebp - 0x7c], eax
call fcn.00412440
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x1c], 0
cmp dword [ebp - 0x2c], 0xffffffff
jle 0x4123ea
mov eax, dword [ebp - 0x28]
add eax, 1
mov dword [ebp - 0x28], eax
call sub.cvirte.dll_ProcessSystemEvents
mov ecx, dword [0x487200]
mov edx, esp
mov dword [edx], ecx
mov dword [edx + 8], 0x486974
mov dword [edx + 4], 4
mov dword [ebp - 0x80], eax
call sub.cvirte.dll_GetCtrlVal
sub esp, 0xc
mov dword [ebp - 0x84], eax
jmp 0x4121e8
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sub.cvirte.dll_fclose
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x88], eax
mov eax, ecx
add esp, 0x94
pop esi
pop edi
pop ebx
pop ebp
ret