Function at 0x40147d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x436e4d
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x1058
call fcn.0042b9d0
mov eax, dword [0x4442c4]
xor eax, esp
mov dword [esp + 0x1054], eax
push ebx
push esi
mov eax, dword [0x4442c4]
xor eax, esp
push eax
lea eax, [esp + 0x1068]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ebx, ecx
lea esi, [esp + 0x10]
mov dword [esp + 0xc], eax
mov dword [esp + 0x18], ebx
call fcn.004023d3
and dword [esp + 0x1070], 0
push 0xbb8
push 2
mov eax, esi
push eax
call fcn.0040241a
push 5
push 3
mov eax, esi
push eax
call fcn.0040241a
lea eax, [esp + 0x1c]
call fcn.00401e4f
mov byte [esp + 0x1070], 1
cmp dword [ebx + 0x18], 8
jb 0x401516
mov eax, dword [ebx + 4]
jmp 0x401519
lea eax, [ebx + 4]
lea ecx, [esp + 0x34]
call fcn.004017b2
lea eax, [esp + 0x10]
mov byte [esp + 0x1070], 2
call fcn.00402387
push eax
lea edx, [esp + 0x38]
lea ecx, [esp + 0x20]
call fcn.00401f7e
mov bl, al
neg bl
push 0
sbb bl, bl
push 1
lea esi, [esp + 0x3c]
inc bl
mov byte [esp + 0x1078], 1
call fcn.0040193c
test bl, bl
je 0x40159b
lea ecx, [esp + 0x1c]
call fcn.00401e7b
lea ecx, [esp + 0x10]
call fcn.0040240f
xor al, al
mov ecx, dword [esp + 0x1068]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [esp + 0x1054]
xor ecx, esp
call fcn.0041a6a2
mov esp, ebp
pop ebp
ret 4
lea eax, [esp + 0x1c]
push eax
call fcn.004020c3
test al, al
je 0x4015ca
cmp dword [edi], 0
je 0x401562
sub esp, 0x1c
mov eax, 0x43baa8
mov ecx, esp
mov dword [esp + 0x28], esp
call fcn.004017b2
mov ecx, dword [edi]
mov eax, dword [ecx]
call dword [eax + 0x14]
jmp 0x401562
lea eax, [esp + 0x1c]
call fcn.004021eb
mov ebx, eax
xor esi, esi
cmp ebx, esi
jne 0x4015df
cmp dword [edi], esi
jmp 0x4015ac
mov ecx, dword [edi]
cmp ecx, esi
mov eax, dword [edi + 4]
mov dword [esp + 0x30], eax
je 0x401625
fldz
mov eax, dword [ecx]
push ecx
push ecx
fstp qword [esp]
push esi
push esi
push dword [esp + 0x28]
call dword [eax + 0xc]
mov ecx, dword [edi]
mov eax, dword [ecx]
push ebx
call dword [eax + 4]
mov ecx, dword [edi]
push dword [esp + 0x30]
mov eax, dword [ecx]
call dword [eax + 8]
fldz
mov ecx, dword [edi]
mov eax, dword [ecx]
push ecx
push ecx
fstp qword [esp]
push esi
push ebx
push dword [esp + 0x28]
call dword [eax + 0xc]
push 0xfff
lea eax, [esp + 0x61]
push esi
push eax
mov dword [esp + 0x34], esi
mov byte [esp + 0x68], 0
call fcn.0041b0d0
add esp, 0xc
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
fldz
test esi, esi
fst qword [esp + 0x4c]
fstp qword [esp + 0x54]
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
jb 0x40173f
ja 0x40167b
test ebx, ebx
jbe 0x40173f
mov ecx, dword [edi]
test ecx, ecx
je 0x40168e
mov eax, dword [ecx]
call dword [eax + 0x18]
test al, al
jne 0x4015ae
lea eax, [esp + 0x5c]
push eax
lea esi, [esp + 0x38]
lea eax, [esp + 0x20]
call fcn.004020ed
mov esi, eax
cmp esi, 0xffffffff
jne 0x4016b2
cmp dword [edi], 0
jne 0x4015ae
jmp 0x401720
test esi, esi
jbe 0x40170f
and dword [esp + 0x2c], 0
push 0
lea eax, [esp + 0x30]
push eax
push esi
lea eax, [esp + 0x68]
push eax
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x2c], esi
je 0x4016e1
cmp dword [edi], 0
jne 0x4015ae
mov ecx, dword [edi]
test ecx, ecx
je 0x401720
fld qword [esp + 0x54]
mov esi, dword [esp + 0x44]
mov eax, dword [ecx]
push ecx
push ecx
fstp qword [esp]
push esi
push ebx
push dword [esp + 0x28]
call dword [eax + 0xc]
mov edx, dword [esp + 0x30]
mov ecx, dword [edi]
mov eax, dword [ecx]
add esi, edx
push esi
call dword [eax + 8]
jmp 0x401720
jne 0x40173f
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
inc dword [esp + 0x28]
cmp dword [esp + 0x28], 0x14
ja 0x40173f
xor eax, eax
cmp dword [esp + 0x48], eax
jb 0x40167b
ja 0x40173f
cmp dword [esp + 0x44], ebx
jb 0x40167b
cmp dword [esp + 0x44], ebx
jne 0x40174d
xor eax, eax
cmp dword [esp + 0x48], eax
je 0x401787
cmp dword [edi], 0
je 0x40176c
sub esp, 0x1c
mov eax, 0x43baa8
mov ecx, esp
mov dword [esp + 0x28], esp
call fcn.004017b2
mov ecx, dword [edi]
mov eax, dword [ecx]
call dword [eax + 0x14]
xor bl, bl
lea ecx, [esp + 0x1c]
call fcn.00401e7b
lea ecx, [esp + 0x10]
call fcn.0040240f
mov al, bl
jmp 0x401576
mov ecx, dword [edi]
add dword [edi + 4], ebx
test ecx, ecx
je 0x4017ae
fld qword [esp + 0x54]
mov eax, dword [ecx]
push ecx
push ecx
fstp qword [esp]
push ebx
push ebx
push dword [esp + 0x28]
call dword [eax + 0xc]
mov ecx, dword [edi]
push dword [edi + 4]
mov eax, dword [ecx]
call dword [eax + 8]
mov bl, 1
jmp 0x40176e