Function at 0x40bf40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
mov eax, dword [0x50b06c]
xor eax, esp
mov dword [esp + 0x30], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov dword [esp + 0x10], edi
movzx ecx, word [edi + 0xe]
mov eax, ecx
and eax, 7
cmp eax, 5
ja case.default.0x40bf72
jmp dword [eax*4 + 0x40c6e8]
push ecx
mov ecx, ebx
call fcn.0040ccd0
mov esi, dword [ebx]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x40bfa8
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40bfa8
push dword [esi]
sub eax, ecx
push eax
push 1
push ecx
call fcn.004a69e7
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0xc]
mov byte [eax], 0x6e
inc dword [esi + 0xc]
mov esi, dword [ebx]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x40bfd8
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40bfd8
push dword [esi]
sub eax, ecx
push eax
push 1
push ecx
call fcn.004a69e7
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0xc]
mov byte [eax], 0x75
inc dword [esi + 0xc]
mov esi, dword [ebx]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x40c008
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40c008
push dword [esi]
sub eax, ecx
push eax
push 1
push ecx
call fcn.004a69e7
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0xc]
mov byte [eax], 0x6c
inc dword [esi + 0xc]
mov esi, dword [ebx]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x40c038
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40c038
push dword [esi]
sub eax, ecx
push eax
push 1
push ecx
call fcn.004a69e7
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0xc]
mov byte [eax], 0x6c
inc dword [esi + 0xc]
jmp 0x40c6d2
push ecx
mov ecx, ebx
call fcn.0040ccd0
push 0
mov ecx, ebx
call fcn.0040caa0
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.004879f1
mov esp, ebp
pop ebp
ret 4
push ecx
mov ecx, ebx
call fcn.0040ccd0
push 1
mov ecx, ebx
call fcn.0040caa0
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.004879f1
mov esp, ebp
pop ebp
ret 4
push ecx
mov ecx, ebx
call fcn.0040ccd0
mov eax, dword [ebx + 0x10]
add eax, 8
cmp eax, dword [ebx + 0x14]
jbe 0x40c0ac
push ecx
lea ecx, [ebx + 4]
call fcn.0040d000
mov ecx, dword [ebx + 0x10]
lea eax, [ecx + 8]
mov dword [ebx + 0x10], eax
mov dword [ecx], 0
mov byte [ecx + 4], 0
mov esi, dword [ebx]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x40c0e6
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40c0e6
push dword [esi]
sub eax, ecx
push eax
push 1
push ecx
call fcn.004a69e7
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0xc]
mov byte [eax], 0x7b
inc dword [esi + 0xc]
mov ecx, dword [edi]
mov eax, dword [edi + 8]
shl ecx, 5
add ecx, eax
cmp eax, ecx
je 0x40c17b
lea esi, [eax + 0xd]
mov eax, 0x1000
mov dx, word [esi + 1]
and dx, ax
je 0x40c11e
movsx eax, byte [esi]
mov ecx, 0xd
sub ecx, eax
mov dword [esp + 0x1c], ecx
jmp 0x40c125
mov eax, dword [esi - 0xd]
mov dword [esp + 0x1c], eax
lea eax, [esi - 0xd]
test dx, dx
jne 0x40c130
mov eax, dword [esi - 5]
push ecx
mov ecx, ebx
mov dword [esp + 0x14], eax
call fcn.0040ccd0
push dword [esp + 0x1c]
mov ecx, ebx
push dword [esp + 0x14]
call fcn.0040c860
test al, al
je 0x40c225
push ebx
lea ecx, [esi + 3]
call fcn.0040bf40
test al, al
je 0x40c225
mov ecx, dword [edi]
add esi, 0x20
shl ecx, 5
add ecx, dword [edi + 8]
lea eax, [esi - 0xd]
cmp eax, ecx
mov eax, 0x1000
jne 0x40c105
add dword [ebx + 0x10], 0xfffffff8
mov eax, dword [ebx + 0x10]
cmp dword [eax], 0
je 0x40c1be
mov esi, dword [ebx]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x40c1ae
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40c1ae
push dword [esi]
sub eax, ecx
push eax
push 1
push ecx
call fcn.004a69e7
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0xc]
mov ecx, ebx
mov byte [eax], 0xa
inc dword [esi + 0xc]
call fcn.0040cc40
mov esi, dword [ebx]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x40c1e5
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40c1e5
push dword [esi]
sub eax, ecx
push eax
push 1
push ecx
call fcn.004a69e7
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0xc]
mov byte [eax], 0x7d
inc dword [esi + 0xc]
mov eax, dword [ebx + 0x10]
cmp eax, dword [ebx + 0xc]
jne 0x40c6d2
mov esi, dword [ebx]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40c6d2
push dword [esi]
sub eax, ecx
push eax
push 1
push ecx
call fcn.004a69e7
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
jmp 0x40c6d2
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.004879f1
mov esp, ebp
pop ebp
ret 4
push ecx
mov ecx, ebx
call fcn.0040ccd0
mov eax, dword [ebx + 0x10]
add eax, 8
cmp eax, dword [ebx + 0x14]
jbe 0x40c257
push ecx
lea ecx, [ebx + 4]
call fcn.0040d000
mov ecx, dword [ebx + 0x10]
lea eax, [ecx + 8]
mov dword [ebx + 0x10], eax
mov dword [ecx], 0
mov byte [ecx + 4], 1
mov esi, dword [ebx]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x40c291
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40c291
push dword [esi]
sub eax, ecx
push eax
push 1
push ecx
call fcn.004a69e7
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0xc]
mov byte [eax], 0x5b
inc dword [esi + 0xc]
mov eax, dword [edi]
mov esi, dword [edi + 8]
shl eax, 4
add eax, esi
cmp esi, eax
je 0x40c2c7
push ebx
mov ecx, esi
call fcn.0040bf40
test al, al
je 0x40c225
mov eax, dword [edi]
add esi, 0x10
shl eax, 4
add eax, dword [edi + 8]
cmp esi, eax
jne 0x40c2a8
add dword [ebx + 0x10], 0xfffffff8
mov eax, dword [ebx + 0x10]
cmp dword [eax], 0
je 0x40c310
test byte [ebx + 0x2c], 1
jne 0x40c310
mov esi, dword [ebx]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x40c300
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40c300
push dword [esi]
sub eax, ecx
push eax
push 1
push ecx
call fcn.004a69e7
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0xc]
mov ecx, ebx
mov byte [eax], 0xa
inc dword [esi + 0xc]
call fcn.0040cc40
mov esi, dword [ebx]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x40c337
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40c337
push dword [esi]
sub eax, ecx
push eax
push 1
push ecx
call fcn.004a69e7
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0xc]
mov byte [eax], 0x5d
inc dword [esi + 0xc]
mov eax, dword [ebx + 0x10]
cmp eax, dword [ebx + 0xc]
jne 0x40c6d2
mov esi, dword [ebx]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40c6d2
push dword [esi]
sub eax, ecx
push eax
push 1
push ecx
call fcn.004a69e7
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
jmp 0x40c6d2
test ecx, 0x1000
je 0x40c38c
movsx eax, byte [edi + 0xd]
mov esi, 0xd
sub esi, eax
jmp 0x40c391
mov esi, dword [edi]
mov edi, dword [edi + 8]
push ecx
mov ecx, ebx
call fcn.0040ccd0
push esi
push edi
mov ecx, ebx
call fcn.0040c860
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.004879f1
mov esp, ebp
pop ebp
ret 4
mov eax, ecx
shr eax, 9
test al, 1
je 0x40c477
movsd xmm0, qword [edi]
push ecx
mov ecx, ebx
movsd qword [esp + 0x14], xmm0
call fcn.0040ccd0
movsd xmm0, qword [esp + 0x10]
movsd qword [esp + 0x10], xmm0
mov eax, dword [esp + 0x14]
and eax, 0x7ff00000
xor ecx, ecx
jne 0x40c3f9
cmp eax, 0x7ff00000
je 0x40c225
mov edx, dword [ebx + 0x1c]
lea ecx, [esp + 0x20]
movaps xmm2, xmm0
call fcn.0040b920
lea esi, [esp + 0x20]
mov ecx, eax
mov edx, esi
xor edi, edi
sub ecx, edx
xor edx, edx
cmp esi, eax
cmova ecx, edx
mov dword [esp + 0x10], ecx
test ecx, ecx
je 0x40c6d2
nop word [eax + eax]
mov esi, dword [ebx]
mov al, byte [esp + edi + 0x20]
mov byte [esp + 0xf], al
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x40c45f
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40c45f
push dword [esi]
sub eax, ecx
push eax
push 1
push ecx
call fcn.004a69e7
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0xc]
inc edi
mov cl, byte [esp + 0xf]
mov byte [eax], cl
inc dword [esi + 0xc]
cmp edi, dword [esp + 0x10]
jne 0x40c430
jmp 0x40c6d2
mov al, cl
shr al, 5
test al, 1
je 0x40c520
mov esi, dword [edi]
push ecx
mov ecx, ebx
call fcn.0040ccd0
lea edx, [esp + 0x20]
test esi, esi
jns 0x40c4a2
not esi
mov byte [esp + 0x20], 0x2d
lea edx, [esp + 0x21]
inc esi
mov ecx, esi
call fcn.0040a8e0
lea edi, [esp + 0x20]
xor ecx, ecx
mov edx, edi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], edx
mov esi, edi
mov edx, eax
sub edx, esi
xor esi, esi
cmp edi, eax
cmova edx, esi
mov dword [esp + 0x1c], edx
test edx, edx
je 0x40c6d2
mov esi, dword [ebx]
mov al, byte [edi]
mov byte [esp + 0xf], al
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x40c503
mov edx, dword [esi + 4]
cmp eax, edx
je 0x40c503
push dword [esi]
sub eax, edx
push eax
push 1
push edx
call fcn.004a69e7
mov eax, dword [esi + 4]
add esp, 0x10
mov ecx, dword [esp + 0x10]
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0xc]
inc ecx
mov dl, byte [esp + 0xf]
inc edi
mov dword [esp + 0x10], ecx
mov byte [eax], dl
inc dword [esi + 0xc]
cmp ecx, dword [esp + 0x1c]
jne 0x40c4d2
jmp 0x40c6d2
mov al, cl
shr al, 6
test al, 1
je 0x40c5a7
mov esi, dword [edi]
push ecx
mov ecx, ebx
call fcn.0040ccd0
lea edx, [esp + 0x20]
mov ecx, esi
call fcn.0040a8e0
lea esi, [esp + 0x20]
mov ecx, eax
mov edx, esi
xor edi, edi
sub ecx, edx
xor edx, edx
cmp esi, eax
cmova ecx, edx
mov dword [esp + 0x10], ecx
test ecx, ecx
je 0x40c6d2
nop dword [eax]
mov esi, dword [ebx]
mov al, byte [esp + edi + 0x20]
mov byte [esp + 0xf], al
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x40c58f
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40c58f
push dword [esi]
sub eax, ecx
push eax
push 1
push ecx
call fcn.004a69e7
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0xc]
inc edi
mov cl, byte [esp + 0xf]
mov byte [eax], cl
inc dword [esi + 0xc]
cmp edi, dword [esp + 0x10]
jne 0x40c560
jmp 0x40c6d2
shr cl, 7
push ecx
test cl, 1
mov ecx, ebx
je 0x40c654
mov esi, dword [edi]
mov edi, dword [edi + 4]
call fcn.0040ccd0
lea ecx, [esp + 0x20]
test edi, edi
jg 0x40c5e1
jl 0x40c5ce
test esi, esi
jae 0x40c5e1
not esi
mov byte [esp + 0x20], 0x2d
add esi, 1
lea ecx, [esp + 0x21]
not edi
adc edi, 0
push edi
push esi
call fcn.0040aae0
lea esi, [esp + 0x28]
mov ecx, eax
mov edx, esi
add esp, 8
sub ecx, edx
xor edi, edi
xor edx, edx
cmp esi, eax
cmova ecx, edx
mov dword [esp + 0x10], ecx
test ecx, ecx
je 0x40c6d2
nop word [eax + eax]
mov esi, dword [ebx]
mov al, byte [esp + edi + 0x20]
mov byte [esp + 0xf], al
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x40c63f
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40c63f
push dword [esi]
sub eax, ecx
push eax
push 1
push ecx
call fcn.004a69e7
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0xc]
inc edi
mov cl, byte [esp + 0xf]
mov byte [eax], cl
inc dword [esi + 0xc]
cmp edi, dword [esp + 0x10]
jne 0x40c610
jmp 0x40c6d2
mov esi, dword [esp + 0x14]
mov edi, dword [edi]
mov esi, dword [esi + 4]
call fcn.0040ccd0
push esi
push edi
lea ecx, [esp + 0x28]
call fcn.0040aae0
lea esi, [esp + 0x28]
mov ecx, eax
mov edx, esi
add esp, 8
sub ecx, edx
xor edi, edi
xor edx, edx
cmp esi, eax
cmova ecx, edx
mov dword [esp + 0x10], ecx
test ecx, ecx
je 0x40c6d2
nop dword [eax + eax]
mov esi, dword [ebx]
mov al, byte [esp + edi + 0x20]
mov byte [esp + 0xf], al
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x40c6bf
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40c6bf
push dword [esi]
sub eax, ecx
push eax
push 1
push ecx
call fcn.004a69e7
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0xc]
inc edi
mov cl, byte [esp + 0xf]
mov byte [eax], cl
inc dword [esi + 0xc]
cmp edi, dword [esp + 0x10]
jne 0x40c690
mov ecx, dword [esp + 0x3c]
mov al, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004879f1
mov esp, ebp
pop ebp
ret 4