Function at 0x102f71f5
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x70
push ebx
push esi
push edi
mov edi, ecx
call fcn.102f7043
push dword [ebp + 0x1c]
and dword [ebp - 0xc], 0
lea ecx, [ebp - 0x70]
mov dword [ebp - 4], eax
mov dword [ebp - 8], edx
call fcn.102f36bd
mov ebx, dword [ebp + 0x14]
lea ecx, [ebp - 0x70]
mov eax, 0x10000
cmp ebx, eax
mov esi, eax
mov eax, dword [ebp + 0x18]
cmovb esi, ebx
mov dword [ebp - 0x50], eax
and dword [ebp - 0x40], 0
push 0
push ebx
mov dword [ebp + 0x14], esi
call fcn.102f4545
mov ecx, dword [ebp + 8]
mov esi, ebx
mov edx, dword [ebp + 0xc]
add esi, ecx
push 0
pop eax
adc eax, edx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 4]
add eax, 0x10000
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 8]
adc eax, 0
mov dword [ebp - 0x1c], edx
cmp dword [ebp - 0x10], eax
jb 0x102f72b7
ja 0x102f7279
cmp esi, dword [ebp - 0x20]
jbe 0x102f72b7
cmp dword [ebp - 0x6c], 0
je 0x102f728b
lea ecx, [ebp - 0x70]
call fcn.102f7be4
mov esi, eax
jmp 0x102f728d
xor esi, esi
test esi, esi
js 0x102f73b4
push dword [ebp + 0x1c]
lea eax, [edi + 8]
push dword [ebp - 0x10]
mov ecx, dword [eax]
push dword [ebp - 0x24]
push eax
call dword [ecx + 0x18]
mov edx, dword [ebp + 0xc]
xor ecx, ecx
test eax, eax
setns cl
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp + 8]
and dword [ebp - 0x28], 0
cmp dword [ebp - 0x6c], 0
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], edx
je 0x102f72d3
lea ecx, [ebp - 0x70]
call fcn.102f7be4
mov esi, eax
jmp 0x102f72d5
xor esi, esi
test esi, esi
js 0x102f739a
mov esi, dword [ebp + 0x14]
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x14]
push eax
push esi
push dword [ebp + 0x10]
push dword [edi + 0x20]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [edi + 0x28], 0
je 0x102f7324
test eax, eax
jne 0x102f7343
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x102f7328
push 1
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x38]
push eax
push dword [edi + 0x20]
call fcn.102fdec3
add esp, 0x10
movzx eax, al
test eax, eax
jne 0x102f7343
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
jne 0x102f739a
mov esi, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x18]
mov eax, dword [ebp - 0x14]
sub ebx, eax
add dword [ebp + 0x10], eax
mov edx, dword [ebp - 0x1c]
add dword [ecx], eax
mov ecx, dword [ebp - 0x18]
add ecx, eax
mov dword [ebp - 0x18], ecx
adc edx, 0
mov dword [ebp - 0x1c], edx
cmp dword [ebp - 8], edx
ja 0x102f7373
jb 0x102f736d
cmp dword [ebp - 4], ecx
ja 0x102f7373
mov dword [ebp - 4], ecx
mov dword [ebp - 8], edx
cmp esi, eax
jne 0x102f7395
xor esi, esi
test ebx, ebx
je 0x102f7391
mov esi, 0x10000
cmp ebx, esi
mov eax, esi
cmovb eax, ebx
mov dword [ebp + 0x14], eax
jmp 0x102f72b7
xor eax, eax
jmp 0x102f739d
mov esi, 0x80004005
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x102f73b4
push 0
push dword [ebp - 8]
lea eax, [edi + 8]
push dword [ebp - 4]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x18]
jmp 0x102f73c0
mov eax, dword [ebp - 4]
mov dword [edi + 0x50], eax
mov eax, dword [ebp - 8]
mov dword [edi + 0x54], eax
lea ecx, [ebp - 0x70]
call fcn.102f3771
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18