Function at 0x40f8ef
Capabilities:
Write file on windows

Disassembly:
push 0x11c
mov eax, 0x43b7c9
call fcn.0042145f
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 0x40fdb4
xor ebx, ebx
cmp dword [eax + 0x10], ebx
je 0x40fdb4
call fcn.00419cac
push 0x24
call fcn.00420ad9
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], 0x419db0
mov dword [edi + 4], 0x419e10
mov dword [edi + 8], 0x419e20
mov dword [edi + 0xc], 0x419e70
mov dword [edi + 0x18], ebx
push eax
mov dword [edi + 0x14], ebx
push 0x450b10
mov dword [edi + 0x20], eax
call dword [0x450b10]
add esp, 0xc
mov dword [edi + 0x1c], eax
test eax, eax
jne 0x40f98d
push 0xe
pop ebx
jmp 0x40fd58
push 0x80
call fcn.00420ad9
push 0x80
mov esi, eax
push ebx
push esi
mov dword [ebp - 0x88], esi
call fcn.00422950
mov edx, 0x450b10
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x2c], edx
mov ecx, esi
mov byte [ebp - 4], 1
call fcn.00417789
push edx
push edx
mov edx, edi
call fcn.00419600
add esp, 0x18
mov dword [ebp - 0x8c], eax
test eax, eax
je 0x40f9f5
mov edx, 0x450b10
mov ecx, esi
call fcn.004177c4
mov ecx, dword [ebp - 0x8c]
call fcn.0040f303
mov ebx, eax
jmp 0x40fd4c
cmp byte [ebp + 0x14], 0
jne 0x40fd4c
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 0x40fd2a
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 0x40fd14
push dword [ebp - 0x84]
mov edx, esi
lea ecx, [ebp - 0x44]
call fcn.0040f49e
pop ecx
mov eax, dword [ebp - 0x98]
mov byte [ebp - 4], 2
mov eax, dword [eax + 0x24]
test eax, eax
je 0x40fabc
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 0x40fabc
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 1
call fcn.0040812b
jmp 0x40fd14
mov eax, 0x450b10
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.00419966
add esp, 0x20
test eax, eax
jne 0x40fda1
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 0x40fb32
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 0x40fb84
mov esi, dword [esi]
lea eax, [ebp - 0x80]
push eax
lea ecx, [ebp - 0x74]
call fcn.0041744d
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 0x40fbae
lea eax, [eax + 2]
inc ecx
cmp word [eax], bx
jne 0x40fba5
push ecx
push esi
lea ecx, [ebp - 0x74]
call fcn.00417655
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.004101ca
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 0x40fc21
lea esi, [edx - 2]
mov cx, word [esi]
call fcn.00416f2b
test al, al
je 0x40fc21
push 0x3a
pop eax
cmp ax, word [edx - 4]
je 0x40fc21
mov dword [ebp - 0x1c], esi
mov esi, dword [ebp - 0x80]
mov edx, esi
mov ecx, dword [ebp - 0x74]
call fcn.004101ca
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], esi
call fcn.0040fe5f
test eax, eax
jne 0x40fd97
or dword [ebp - 0x7c], 0xffffffff
lea edx, [ebp - 0x54]
lea ecx, [ebp - 0x128]
call fcn.0040fec4
mov esi, eax
lea edx, [ebp - 0x20]
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x110]
call fcn.0040fec4
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], 0xf
push ecx
push ecx
mov edx, esi
mov ecx, eax
call fcn.00419e92
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 0x40fd7b
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.0040ff42
cmp dword [ebp - 0x90], esi
je 0x40fcee
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 0x40fd66
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x40fcfa
call fcn.00407752
lea ecx, [ebp - 0x74]
call fcn.004143c0
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 0x40fa26
push dword [ebp - 0x94]
mov ebx, 0x450b10
push ebx
call dword [0x450b14]
push dword [edi + 0x1c]
push ebx
call dword [0x450b14]
mov ebx, dword [ebp - 0x80]
add esp, 0x10
mov edx, 0x450b10
mov ecx, esi
call fcn.004177c4
push 0x24
push edi
call fcn.00420b09
pop ecx
pop ecx
mov eax, ebx
jmp 0x40fdb9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x80], eax
test ecx, ecx
je 0x40fd7b
call fcn.00407752
lea ecx, [ebp - 0x74]
call fcn.004143c0
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 1
call fcn.0040812b
mov esi, dword [ebp - 0x88]
jmp 0x40fd2a
or eax, 0x20000000
mov dword [ebp - 0x80], eax
jmp 0x40fd7b
mov ecx, eax
call fcn.0040f303
lea ecx, [ebp - 0x44]
mov ebx, eax
call fcn.0040812b
jmp 0x40fd4c
mov eax, 0xa0
call fcn.0042140e
ret 0x10