Function at 0x40bc5f
Capabilities:
Write file on windows

Disassembly:
push 0x108
mov eax, 0x434941
call fcn.0041af0e
mov dword [ebp - 0xb0], ecx
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0xac], eax
mov dword [ebp - 0x98], ecx
test esi, esi
je 0x40c1c8
xor ebx, ebx
cmp dword [eax + 0x10], ebx
je 0x40c1c8
call fcn.00413dfc
push 0x24
call fcn.0041a4b9
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], 0x413f00
mov dword [edi + 4], 0x413f60
mov dword [edi + 8], 0x413f70
mov dword [edi + 0xc], 0x413fc0
mov dword [edi + 0x18], ebx
push eax
mov dword [edi + 0x14], ebx
push 0x448b10
mov dword [edi + 0x20], eax
call dword [0x448b10]
add esp, 0xc
mov dword [edi + 0x1c], eax
test eax, eax
jne 0x40bcfd
push 0xe
pop ebx
jmp 0x40c158
push 0x80
call fcn.0041a4b9
push 0x80
mov esi, eax
push ebx
push esi
mov dword [ebp - 0x88], esi
call fcn.0041c400
mov edx, 0x448b10
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x64], edx
mov ecx, esi
mov byte [ebp - 4], 1
call fcn.004118ce
push edx
push edx
mov edx, edi
call fcn.00413745
add esp, 0x18
mov dword [ebp - 0x8c], eax
test eax, eax
je 0x40bd5e
mov edx, 0x448b10
mov ecx, esi
call fcn.00411909
mov ecx, dword [ebp - 0x8c]
jmp 0x40c1bf
cmp byte [ebp + 0x14], 0
jne 0x40c14c
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 0x40c12a
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 0x40c114
push dword [ebp - 0x84]
mov edx, esi
lea ecx, [ebp - 0x38]
call fcn.0040b7fe
pop ecx
mov eax, dword [ebp - 0x98]
mov byte [ebp - 4], 2
mov eax, dword [eax + 0x24]
test eax, eax
je 0x40be25
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 - 0x68], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x6c], edx
lea edx, [ebp - 0x6c]
push edx
lea edx, [ebp - 0x38]
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 0x40be25
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 1
call fcn.00404484
jmp 0x40c114
mov eax, 0x448b10
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.00413aab
add esp, 0x20
mov dword [ebp - 0x80], eax
test eax, eax
jne 0x40c1b4
mov dword [ebp - 0x80], ebx
mov byte [ebp - 4], 3
lea eax, [ebp - 0x38]
cmp dword [ebp - 0x24], 8
mov byte [ebp - 0xa4], bl
jb 0x40be91
mov eax, dword [ebp - 0x38]
push dword [ebp - 0xa4]
lea ecx, [ebp - 0xfc]
push dword [ebp - 0x28]
push eax
call fcn.00403c87
add esp, 0xc
mov byte [ebp - 4], 4
lea ecx, [ebp - 0xfc]
cmp dword [ebp - 0xe8], 8
jb 0x40bec2
mov ecx, dword [ebp - 0xfc]
mov eax, dword [ebp - 0xec]
lea esi, [ecx + eax*2]
mov edx, esi
call fcn.004114ec
sub esi, eax
mov byte [ebp - 0xa8], bl
push dword [ebp - 0xa8]
sar esi, 1
lea ecx, [ebp - 0x114]
push esi
push eax
call fcn.00403c87
add esp, 0xc
push dword [ebp - 0xac]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xe4]
mov dword [ebp - 0xe4], ebx
mov dword [ebp - 0xd4], ebx
mov dword [ebp - 0xd0], ebx
call fcn.0040429a
lea eax, [ebp - 0x114]
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0xe4]
call fcn.00403f37
push eax
lea ecx, [ebp - 0xcc]
mov dword [ebp - 0xcc], ebx
mov dword [ebp - 0xbc], ebx
mov dword [ebp - 0xb8], ebx
call fcn.0040429a
lea ecx, [ebp - 0xe4]
call fcn.00404484
cmp dword [ebp - 0xb8], 8
lea esi, [ebp - 0xcc]
jb 0x40bf6d
mov esi, dword [ebp - 0xcc]
lea eax, [ebp - 0x80]
push eax
lea ecx, [ebp - 0x58]
call fcn.0041150c
mov byte [ebp - 4], 8
xor ecx, ecx
mov eax, dword [ebp - 0x58]
mov word [eax], cx
mov eax, esi
mov ecx, ebx
cmp word [esi], bx
je 0x40bf97
lea eax, [eax + 2]
inc ecx
cmp word [eax], bx
jne 0x40bf8e
push ecx
push esi
lea ecx, [ebp - 0x58]
call fcn.004117a1
lea ecx, [ebp - 0xcc]
call fcn.00404484
lea ecx, [ebp - 0x114]
call fcn.00404484
lea ecx, [ebp - 0xfc]
call fcn.00404484
mov byte [ebp - 4], 0xd
mov ecx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x54]
lea eax, [ecx + eax*2]
mov edx, eax
mov dword [ebp - 0x80], eax
call fcn.0040c68d
mov edx, eax
mov eax, dword [ebp - 0x58]
mov ecx, edx
mov dword [ebp - 0x20], eax
sub ecx, eax
mov dword [ebp - 0x1c], edx
sar ecx, 1
cmp ecx, 1
jbe 0x40c00a
lea esi, [edx - 2]
mov cx, word [esi]
call fcn.00410fce
test al, al
je 0x40c00a
push 0x3a
pop eax
cmp ax, word [edx - 4]
je 0x40c00a
mov dword [ebp - 0x1c], esi
mov esi, dword [ebp - 0x80]
mov edx, esi
mov ecx, dword [ebp - 0x58]
call fcn.0040c68d
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], esi
call fcn.0040c27f
test eax, eax
jne 0x40c1aa
or dword [ebp - 0x7c], 0xffffffff
lea edx, [ebp - 0x74]
lea ecx, [ebp - 0xcc]
call fcn.0040c32b
mov esi, eax
lea edx, [ebp - 0x20]
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0xe4]
call fcn.0040c32b
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], 0xf
push ecx
push ecx
mov edx, esi
mov ecx, eax
call fcn.00414022
pop ecx
pop ecx
mov esi, eax
lea ecx, [ebp - 0xe4]
mov dword [ebp - 0x80], esi
call fcn.00404484
lea ecx, [ebp - 0xcc]
mov byte [ebp - 4], 0xd
call fcn.00404484
test esi, esi
jne 0x40c17b
lea eax, [ebp - 0x7c]
mov dword [ebp - 0x18], ebx
push eax
push dword [ebp - 0xb0]
mov dword [ebp - 0x14], ebx
push ecx
lea ecx, [ebp - 0x18]
call fcn.0040c3a9
cmp dword [ebp - 0x90], esi
je 0x40c0db
push ebx
lea eax, [ebp - 0x5c]
mov dword [ebp - 0x5c], 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 0x40c166
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x40c0e7
call fcn.00404271
push ebx
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 2
call fcn.004116a3
mov ecx, dword [ebp - 0x4c]
test ecx, ecx
je 0x40c102
mov eax, dword [ecx]
push ecx
call dword [eax + 4]
pop ecx
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 1
call fcn.00404484
mov esi, dword [ebp - 0x88]
mov eax, dword [ebp - 0x84]
inc eax
mov dword [ebp - 0x84], eax
cmp eax, dword [esi + 0x40]
jb 0x40bd8f
push dword [ebp - 0x94]
mov ebx, 0x448b10
push ebx
call dword [0x448b14]
push dword [edi + 0x1c]
push ebx
call dword [0x448b14]
mov ebx, dword [ebp - 0x80]
add esp, 0x10
mov edx, 0x448b10
mov ecx, esi
call fcn.00411909
push 0x24
push edi
call fcn.0041a4e9
pop ecx
pop ecx
mov eax, ebx
jmp 0x40c1cd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x80], eax
test ecx, ecx
je 0x40c17b
call fcn.00404271
push ebx
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 2
call fcn.004116a3
mov ecx, dword [ebp - 0x4c]
test ecx, ecx
je 0x40c196
mov eax, dword [ecx]
push ecx
call dword [eax + 4]
pop ecx
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 1
call fcn.00404484
mov esi, dword [ebp - 0x88]
jmp 0x40c12a
or eax, 0x20000000
mov dword [ebp - 0x80], eax
jmp 0x40c17b
lea ecx, [ebp - 0x38]
call fcn.00404484
mov ecx, dword [ebp - 0x80]
call fcn.0040b6e3
mov ebx, eax
jmp 0x40c14c
mov eax, 0xa0
call fcn.0041aebd
ret 0x10