Function at 0x10014120
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x10014367
push edi
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x10014366
push ebx
mov ebx, dword [ebp + 0x10]
test ebx, ebx
je 0x10014365
push 0x3c
lea eax, [ebp - 0x44]
push 0
push eax
call fcn.1002c8c0
mov eax, esi
add esp, 0xc
mov dword [ebp - 0x44], 0x3c
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10014170
sub eax, edx
sar eax, 1
mov dword [ebp - 0x18], eax
je 0x10014365
mov ecx, edi
lea esi, [ecx + 2]
lea ecx, [ecx]
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x10014190
sub ecx, esi
sar ecx, 1
mov eax, ecx
mov dword [ebp - 0x14], eax
je 0x10014365
mov ecx, ebx
lea esi, [ecx + 2]
nop
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x100141b0
sub ecx, esi
sar ecx, 1
mov edi, ecx
mov dword [ebp - 0x10], edi
je 0x10014365
mov ebx, dword [ebp + 0x28]
test ebx, ebx
je 0x100141e8
mov ecx, ebx
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x100141d6
sub ecx, esi
sar ecx, 1
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 8]
mov dword [ebp - 0x3c], ecx
mov ecx, dword [edx + 4]
mov edx, dword [ebp + 0x18]
mov dword [ebp - 0x38], ecx
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x34], edx
mov edx, dword [ecx]
mov ecx, dword [ecx + 4]
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebp + 0x20]
mov dword [ebp - 0x30], edx
mov edx, dword [ecx]
mov ecx, dword [ecx + 4]
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp + 0x24]
mov dword [ebp - 0x28], edx
mov edx, dword [ecx]
mov ecx, dword [ecx + 4]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x20], edx
test ecx, ecx
jne 0x1001423f
mov ecx, dword [ebp - 0xc]
add ecx, edi
add ecx, eax
add ecx, dword [ebp - 0x18]
lea ecx, [ecx + ecx + 0x44]
mov dword [ebp - 0x40], ecx
push ecx
call fcn.10024940
mov esi, eax
add esp, 4
test esi, esi
je 0x10014365
mov eax, dword [ebp - 0x40]
test eax, eax
jne 0x1001426f
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x44]
add ecx, dword [ebp - 0x14]
add ecx, dword [ebp - 0x18]
lea eax, [edx + ecx*2 + 8]
mov dword [ebp - 0x40], eax
push eax
push 0
push esi
call fcn.1002c8c0
mov eax, dword [ebp - 0x44]
push eax
lea ecx, [ebp - 0x44]
push ecx
push esi
call fcn.1002cac0
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp + 8]
mov ecx, dword [esi]
push edx
push eax
add ecx, esi
push ecx
call fcn.1002c874
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 0xc]
mov ecx, dword [esi + 0x2c]
push edx
mov edx, dword [esi]
push eax
lea eax, [edx + ecx*2 + 2]
add eax, esi
push eax
call fcn.1002c874
mov ecx, dword [ebp - 0x10]
mov eax, dword [esi + 0x30]
mov edx, dword [ebp + 0x10]
add eax, dword [esi + 0x2c]
push ecx
mov ecx, dword [esi]
push edx
lea edx, [ecx + eax*2 + 4]
add edx, esi
push edx
call fcn.1002c874
mov eax, dword [ebp - 0xc]
add esp, 0x3c
test eax, eax
je 0x100142f3
mov ecx, dword [esi]
push eax
mov eax, dword [esi + 0x34]
add eax, dword [esi + 0x30]
push ebx
add eax, dword [esi + 0x2c]
lea edx, [ecx + eax*2 + 6]
add edx, esi
push edx
call fcn.1002c874
add esp, 0xc
mov ebx, dword [ebp - 8]
mov ecx, ebx
call fcn.10013f80
mov edi, eax
cmp edi, 0xffffffff
je 0x10014353
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x10014353
mov eax, dword [ebp - 0x40]
mov dword [ebp + 0x28], 0
test eax, eax
jne 0x1001433a
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x44]
add ecx, dword [ebp - 0x14]
add ecx, dword [ebp - 0x18]
lea eax, [edx + ecx*2 + 8]
mov dword [ebp - 0x40], eax
push 0
lea ecx, [ebp + 0x28]
push ecx
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10014353
mov edx, dword [ebp - 0x38]
mov dword [ebp - 4], edx
push esi
call fcn.10024970
add esp, 4
cmp dword [ebp - 4], 0xffffffff
je 0x10014365
inc dword [ebx + 4]
pop ebx
pop edi
mov eax, dword [ebp - 4]
pop esi
mov esp, ebp
pop ebp
ret 0x24