Function at 0x411150
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x2c
mov al, byte [esp + 0x34]
push ebx
push ebp
mov ebp, dword [esp + 0x38]
mov ebx, ecx
push esi
push edi
mov edi, ebp
cmp byte [ebx + 0x4c], 0
mov dword [esp + 0x10], edi
je 0x4113d4
mov cl, byte [ebp]
lea edx, [ebx + 0x4e]
movzx eax, al
shl eax, 6
add edx, eax
mov dword [esp + 0x18], edx
test cl, cl
je 0x41141c
jle 0x4113ae
cmp cl, 0x40
jge 0x4113ae
movzx eax, cl
cmp byte [eax + edx], 0
je 0x4113ae
cmp ebp, edi
jae 0x41126c
nop
mov esi, edi
mov eax, SysReAllocString
sub esi, ebp
cmp esi, 0x7fffffff
cmova esi, eax
mov eax, dword [ebx + 0x40]
test eax, eax
je 0x4111db
push eax
push esi
push 1
push ebp
call fcn.0041dd3e
add esp, 0x10
jmp 0x411260
mov eax, dword [ebx + 0xec]
add eax, esi
cmp eax, dword [ebx + 0xe8]
jle 0x411236
lea edi, [eax + eax]
push edi
call fcn.004132c5
push dword [ebx + 0xec]
mov dword [esp + 0x1c], eax
push dword [ebx + 0xd0]
push eax
call fcn.00414f40
mov edx, dword [ebx + 0xd0]
lea ecx, [ebx + 0xd4]
add esp, 0x10
cmp edx, ecx
je 0x411226
push edx
call fcn.004130c3
add esp, 4
mov eax, dword [esp + 0x14]
mov dword [ebx + 0xd0], eax
mov dword [ebx + 0xe8], edi
mov eax, dword [ebx + 0xec]
mov edi, dword [ebx + 0xd0]
add edi, eax
add eax, esi
push esi
dec edi
mov dword [ebx + 0xec], eax
push ebp
push edi
call fcn.00414f40
mov byte [edi + esi], 0
add esp, 0xc
mov edi, dword [esp + 0x10]
add ebp, esi
cmp ebp, edi
jb 0x4111b0
mov cl, byte [edi]
cmp cl, 0x20
jge 0x4112e6
movsx eax, cl
movzx eax, al
push eax
lea eax, [esp + 0x20]
push str.x_02X_
push eax
call fcn.0040e560
lea edi, [esp + 0x28]
add esp, 0xc
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x411291
mov eax, dword [ebx + 0x40]
sub edi, ecx
test eax, eax
je 0x4112bb
push eax
push edi
lea eax, [esp + 0x24]
push 1
push eax
call fcn.0041dd3e
mov edi, dword [esp + 0x20]
add esp, 0x10
jmp 0x4113a9
push edi
lea ecx, [ebx + 0xd0]
call fcn.00411f10
push edi
lea esi, [eax - 1]
lea eax, [esp + 0x20]
push eax
push esi
call fcn.00414f40
mov byte [edi + esi], 0
add esp, 0xc
mov edi, dword [esp + 0x10]
jmp 0x4113a9
xor esi, esi
mov eax, 0x4365e8
nop dword [eax]
cmp byte [eax], cl
je 0x411304
add eax, 0xc
inc esi
cmp eax, 0x436624
jl 0x4112f0
jmp 0x4113a9
mov eax, dword [ebx + 0x40]
test eax, eax
je 0x411318
push eax
push 0x26
call fcn.0041d46e
add esp, 8
jmp 0x41132b
push 1
lea ecx, [ebx + 0xd0]
call fcn.00411f10
mov word [eax - 1], 0x26
mov edx, dword [ebx + 0x40]
lea eax, [esi + esi*2]
mov ecx, dword [eax*4 + 0x4365e4]
mov eax, dword [eax*4 + 0x4365e0]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
test edx, edx
je 0x41135a
push edx
push ecx
push 1
push eax
call fcn.0041dd3e
add esp, 0x10
jmp 0x411382
push ecx
lea ecx, [ebx + 0xd0]
call fcn.00411f10
push dword [esp + 0x10]
push dword [esp + 0x18]
lea esi, [eax - 1]
push esi
call fcn.00414f40
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov byte [esi + eax], 0
mov eax, dword [ebx + 0x40]
test eax, eax
je 0x411396
push eax
push 0x3b
call fcn.0041d46e
add esp, 8
jmp 0x4113a9
push 1
lea ecx, [ebx + 0xd0]
call fcn.00411f10
mov word [eax - 1], 0x3b
mov edx, dword [esp + 0x18]
inc ebp
mov cl, byte [edi + 1]
inc edi
mov dword [esp + 0x10], edi
test cl, cl
jne 0x41118b
cmp ebp, edi
jae 0x41141c
sub edi, ebp
mov eax, SysReAllocString
cmp edi, 0x7fffffff
cmova edi, eax
jmp 0x4113e0
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x4113d7
sub edi, ecx
mov eax, dword [ebx + 0x40]
test eax, eax
je 0x4113fe
push eax
push edi
push 1
push ebp
call fcn.0041dd3e
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret 8
push edi
lea ecx, [ebx + 0xd0]
call fcn.00411f10
push edi
push ebp
lea esi, [eax - 1]
push esi
call fcn.00414f40
mov byte [esi + edi], 0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret 8