Function at 0x40f86f
Capabilities:
Write file on windows

Disassembly:
push 0x11c
mov eax, 0x439259
call fcn.0041ef0f
mov dword [ebp - 0xac], ecx
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0xa8], eax
mov dword [ebp - 0x98], ecx
test esi, esi
je 0x40fd31
xor ebx, ebx
cmp dword [eax + 0x10], ebx
je 0x40fd31
call fcn.0041777c
push 0x24
call fcn.0041e589
mov edi, eax
mov dword [edi + 0x1c], ebx
mov dword [ebp - 0x78], edi
mov dword [ebp - 4], ebx
mov eax, 0x100000
mov dword [edi + 0x10], esi
mov dword [edi], 0x417880
mov dword [edi + 4], 0x4178e0
mov dword [edi + 8], 0x4178f0
mov dword [edi + 0xc], 0x417940
mov dword [edi + 0x18], ebx
push eax
mov dword [edi + 0x14], ebx
push 0x44db10
mov dword [edi + 0x20], eax
call dword [0x44db10]
add esp, 0xc
mov dword [edi + 0x1c], eax
test eax, eax
jne 0x40f90d
push 0xe
pop ebx
jmp 0x40fcd4
push 0x80
call fcn.0041e589
push 0x80
mov esi, eax
push ebx
push esi
mov dword [ebp - 0x88], esi
call fcn.00420400
mov edx, 0x44db10
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x2c], edx
mov ecx, esi
mov byte [ebp - 4], 1
call fcn.00415256
push edx
push edx
mov edx, edi
call fcn.004170cd
add esp, 0x18
mov dword [ebp - 0x8c], eax
test eax, eax
je 0x40f96e
mov edx, 0x44db10
mov ecx, esi
call fcn.00415291
mov ecx, dword [ebp - 0x8c]
jmp 0x40fd28
cmp byte [ebp + 0x14], 0
jne 0x40fcc8
or dword [ebp - 0xa0], 0xffffffff
mov eax, ebx
mov dword [ebp - 0x94], ebx
mov dword [ebp - 0x9c], ebx
mov dword [ebp - 0x80], ebx
mov dword [ebp - 0x84], eax
cmp dword [esi + 0x40], ebx
jbe 0x40fca6
mov ecx, eax
mov edx, 0x80
and ecx, 7
sar edx, cl
mov ecx, eax
mov eax, dword [esi + 0x48]
shr ecx, 3
test byte [ecx + eax], dl
jne 0x40fc90
push dword [ebp - 0x84]
mov edx, esi
lea ecx, [ebp - 0x44]
call fcn.0040f41e
pop ecx
mov eax, dword [ebp - 0x98]
mov byte [ebp - 4], 2
mov eax, dword [eax + 0x24]
test eax, eax
je 0x40fa35
mov ecx, dword [esi + 0x44]
mov eax, dword [ebp - 0x84]
mov esi, dword [ebp - 0x84]
mov edx, dword [ecx + eax*8 + 8]
sub edx, dword [ecx + eax*8]
mov eax, dword [ecx + eax*8 + 0xc]
sbb eax, dword [ecx + esi*8 + 4]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x4c], edx
lea edx, [ebp - 0x4c]
push edx
lea edx, [ebp - 0x44]
mov ecx, dword [eax + 0x24]
push edx
mov eax, dword [ecx]
mov eax, dword [eax + 8]
call eax
mov esi, dword [ebp - 0x88]
test al, al
jne 0x40fa35
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 1
call fcn.0040812b
jmp 0x40fc90
mov eax, 0x44db10
mov dword [ebp - 0x8c], ebx
push eax
push eax
lea eax, [ebp - 0x90]
mov dword [ebp - 0x90], ebx
push eax
lea eax, [ebp - 0x8c]
mov edx, edi
push eax
lea eax, [ebp - 0x9c]
mov ecx, esi
push eax
lea eax, [ebp - 0x94]
push eax
lea eax, [ebp - 0xa0]
push eax
push dword [ebp - 0x84]
call fcn.00417433
add esp, 0x20
mov dword [ebp - 0x80], eax
test eax, eax
jne 0x40fd1d
mov dword [ebp - 0x80], ebx
push ecx
lea eax, [ebp - 0x44]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0xf8]
call fcn.0040509b
mov byte [ebp - 4], 4
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
jb 0x40faae
mov eax, dword [eax]
lea esi, [eax + ecx*2]
mov ecx, eax
mov edx, esi
call fcn.00406f03
sub esi, eax
mov byte [ebp - 0xa4], bl
push dword [ebp - 0xa4]
sar esi, 1
lea ecx, [ebp - 0xc8]
push esi
push eax
call fcn.004075ae
mov edx, dword [ebp - 0xa8]
lea eax, [ebp - 0xc8]
push eax
lea ecx, [ebp - 0xe0]
mov byte [ebp - 4], 5
call fcn.00406a2e
add esp, 0x10
mov esi, eax
cmp dword [esi + 0x14], 8
jb 0x40fb00
mov esi, dword [esi]
lea eax, [ebp - 0x80]
push eax
lea ecx, [ebp - 0x74]
call fcn.00414e1a
mov byte [ebp - 4], 7
xor ecx, ecx
mov eax, dword [ebp - 0x74]
mov word [eax], cx
mov eax, esi
mov ecx, ebx
cmp word [esi], bx
je 0x40fb2a
lea eax, [eax + 2]
inc ecx
cmp word [eax], bx
jne 0x40fb21
push ecx
push esi
lea ecx, [ebp - 0x74]
call fcn.00415122
lea ecx, [ebp - 0xe0]
call fcn.0040812b
lea ecx, [ebp - 0xc8]
call fcn.0040812b
lea ecx, [ebp - 0xf8]
call fcn.0040812b
mov byte [ebp - 4], 0xc
mov ecx, dword [ebp - 0x74]
mov eax, dword [ebp - 0x70]
lea eax, [ecx + eax*2]
mov edx, eax
mov dword [ebp - 0x80], eax
call fcn.0041013a
mov edx, eax
mov eax, dword [ebp - 0x74]
mov ecx, edx
mov dword [ebp - 0x20], eax
sub ecx, eax
mov dword [ebp - 0x1c], edx
sar ecx, 1
cmp ecx, 1
jbe 0x40fb9d
lea esi, [edx - 2]
mov cx, word [esi]
call fcn.004148f8
test al, al
je 0x40fb9d
push 0x3a
pop eax
cmp ax, word [edx - 4]
je 0x40fb9d
mov dword [ebp - 0x1c], esi
mov esi, dword [ebp - 0x80]
mov edx, esi
mov ecx, dword [ebp - 0x74]
call fcn.0041013a
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], esi
call fcn.0040fdcf
test eax, eax
jne 0x40fd13
or dword [ebp - 0x7c], 0xffffffff
lea edx, [ebp - 0x54]
lea ecx, [ebp - 0x128]
call fcn.0040fe34
mov esi, eax
lea edx, [ebp - 0x20]
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x110]
call fcn.0040fe34
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], 0xf
push ecx
push ecx
mov edx, esi
mov ecx, eax
call fcn.00417962
pop ecx
pop ecx
mov esi, eax
lea ecx, [ebp - 0x110]
mov dword [ebp - 0x80], esi
call fcn.0040812b
lea ecx, [ebp - 0x128]
mov byte [ebp - 4], 0xc
call fcn.0040812b
test esi, esi
jne 0x40fcf7
lea eax, [ebp - 0x7c]
mov dword [ebp - 0x18], ebx
push eax
push dword [ebp - 0xac]
mov dword [ebp - 0x14], ebx
push ecx
lea ecx, [ebp - 0x18]
call fcn.0040feb2
cmp dword [ebp - 0x90], esi
je 0x40fc6a
push ebx
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], ebx
push eax
push dword [ebp - 0x90]
mov eax, dword [ebp - 0x94]
add eax, dword [ebp - 0x8c]
push eax
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40fce2
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x40fc76
call fcn.00407752
lea ecx, [ebp - 0x74]
call fcn.00414dc9
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 1
call fcn.0040812b
mov esi, dword [ebp - 0x88]
mov eax, dword [ebp - 0x84]
inc eax
mov dword [ebp - 0x84], eax
cmp eax, dword [esi + 0x40]
jb 0x40f99f
push dword [ebp - 0x94]
mov ebx, 0x44db10
push ebx
call dword [0x44db14]
push dword [edi + 0x1c]
push ebx
call dword [0x44db14]
mov ebx, dword [ebp - 0x80]
add esp, 0x10
mov edx, 0x44db10
mov ecx, esi
call fcn.00415291
push 0x24
push edi
call fcn.0041e5b9
pop ecx
pop ecx
mov eax, ebx
jmp 0x40fd36
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x80], eax
test ecx, ecx
je 0x40fcf7
call fcn.00407752
lea ecx, [ebp - 0x74]
call fcn.00414dc9
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 1
call fcn.0040812b
mov esi, dword [ebp - 0x88]
jmp 0x40fca6
or eax, 0x20000000
mov dword [ebp - 0x80], eax
jmp 0x40fcf7
lea ecx, [ebp - 0x44]
call fcn.0040812b
mov ecx, dword [ebp - 0x80]
call fcn.0040f303
mov ebx, eax
jmp 0x40fcc8
mov eax, 0xa0
call fcn.0041eebe
ret 0x10