Function at 0x40f7ef
Capabilities:
Write file on windows

Disassembly:
push 0x11c
mov eax, 0x4392e3
call fcn.0041efaf
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 0x40fcb1
xor ebx, ebx
cmp dword [eax + 0x10], ebx
je 0x40fcb1
call fcn.0041786c
push 0x24
call fcn.0041e629
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], 0x417970
mov dword [edi + 4], 0x4179d0
mov dword [edi + 8], 0x4179e0
mov dword [edi + 0xc], 0x417a30
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 0x40f88d
push 0xe
pop ebx
jmp 0x40fc54
push 0x80
call fcn.0041e629
push 0x80
mov esi, eax
push ebx
push esi
mov dword [ebp - 0x88], esi
call fcn.004204a0
mov edx, 0x44db10
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x2c], edx
mov ecx, esi
mov byte [ebp - 4], 1
call fcn.00415343
push edx
push edx
mov edx, edi
call fcn.004171ba
add esp, 0x18
mov dword [ebp - 0x8c], eax
test eax, eax
je 0x40f8ee
mov edx, 0x44db10
mov ecx, esi
call fcn.0041537e
mov ecx, dword [ebp - 0x8c]
jmp 0x40fca8
cmp byte [ebp + 0x14], 0
jne 0x40fc48
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 0x40fc26
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 0x40fc10
push dword [ebp - 0x84]
mov edx, esi
lea ecx, [ebp - 0x44]
call fcn.0040f39e
pop ecx
mov eax, dword [ebp - 0x98]
mov byte [ebp - 4], 2
mov eax, dword [eax + 0x24]
test eax, eax
je 0x40f9b5
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 0x40f9b5
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 1
call fcn.0040812b
jmp 0x40fc10
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.00417520
add esp, 0x20
mov dword [ebp - 0x80], eax
test eax, eax
jne 0x40fc9d
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 0x40fa2e
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 0x40fa80
mov esi, dword [esi]
lea eax, [ebp - 0x80]
push eax
lea ecx, [ebp - 0x74]
call fcn.00414f15
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 0x40faaa
lea eax, [eax + 2]
inc ecx
cmp word [eax], bx
jne 0x40faa1
push ecx
push esi
lea ecx, [ebp - 0x74]
call fcn.0041520f
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.004100ba
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 0x40fb1d
lea esi, [edx - 2]
mov cx, word [esi]
call fcn.004149f3
test al, al
je 0x40fb1d
push 0x3a
pop eax
cmp ax, word [edx - 4]
je 0x40fb1d
mov dword [ebp - 0x1c], esi
mov esi, dword [ebp - 0x80]
mov edx, esi
mov ecx, dword [ebp - 0x74]
call fcn.004100ba
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], esi
call fcn.0040fd4f
test eax, eax
jne 0x40fc93
or dword [ebp - 0x7c], 0xffffffff
lea edx, [ebp - 0x54]
lea ecx, [ebp - 0x128]
call fcn.0040fdb4
mov esi, eax
lea edx, [ebp - 0x20]
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x110]
call fcn.0040fdb4
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], 0xf
push ecx
push ecx
mov edx, esi
mov ecx, eax
call fcn.00417a52
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 0x40fc77
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.0040fe32
cmp dword [ebp - 0x90], esi
je 0x40fbea
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 0x40fc62
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x40fbf6
call fcn.00407752
lea ecx, [ebp - 0x74]
call fcn.00414ec4
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 0x40f91f
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.0041537e
push 0x24
push edi
call fcn.0041e659
pop ecx
pop ecx
mov eax, ebx
jmp 0x40fcb6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x80], eax
test ecx, ecx
je 0x40fc77
call fcn.00407752
lea ecx, [ebp - 0x74]
call fcn.00414ec4
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 1
call fcn.0040812b
mov esi, dword [ebp - 0x88]
jmp 0x40fc26
or eax, 0x20000000
mov dword [ebp - 0x80], eax
jmp 0x40fc77
lea ecx, [ebp - 0x44]
call fcn.0040812b
mov ecx, dword [ebp - 0x80]
call fcn.0040f283
mov ebx, eax
jmp 0x40fc48
mov eax, 0xa0
call fcn.0041ef5e
ret 0x10