Function at 0x13daff5
Capabilities:
Write file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x14
mov eax, dword [0x41f214]
mov edi, dword [esp + 0x28]
mov dword [esp + 0x10], eax
mov eax, dword [edi + 0x14]
test eax, eax
jle 0x13d5f98
xor esi, esi
mov eax, dword [edi + 0x18]
push 0x402159
push dword [eax + esi*4]
call fcn.013a31e5
add esp, 8
mov eax, dword [edi + 0x14]
inc esi
cmp esi, eax
jl 0x13d5f7d
test eax, eax
je 0x13d5fde
xor ebx, ebx
cmp dword [0x41d700], 0
jne 0x13d61cb
push 0xfffffffffffffff6
call dword [0x4833b8]
mov esi, eax
cmp esi, 0xffffffff
jne 0x13d5fde
push 2
call fcn.013e2e0b
add esp, 4
xor esi, esi
inc esi
push eax
push esi
push 0x21
push 0x4124cd
call fcn.013ee4d5
add esp, 0x10
push esi
call fcn.013d5ac8
mov eax, dword [edi + 8]
test eax, eax
je 0x13d5feb
cmp dword [edi + 4], 0
jne 0x13d5ffb
cmp dword [edi + 0xc], 0
jne 0x13d5ffb
cmp dword [edi + 0x14], 0
je 0x13d61de
push 0xfffffffffffffff5
call dword [0x4833b8]
cmp eax, 0xffffffff
mov dword [esp], eax
je 0x13d61e3
mov eax, dword [edi + 8]
mov edi, dword [esp + 0x28]
test eax, eax
je 0x13d6061
mov ebp, dword [edi + 4]
test ebp, ebp
je 0x13d6061
push ebp
call fcn.013ef39c
add esp, 4
mov ebx, eax
lea eax, [esp + 0xc]
push 0
push eax
push ebx
push ebp
push dword [esp + 0x10]
call dword [0x4834b0]
mov eax, dword [edi + 4]
cmp byte [eax + ebx - 1], 0xa
je 0x13d6061
push 0
lea eax, [esp + 0x10]
push eax
push 1
push 0x406f97
push dword [esp + 0x10]
call dword [0x4834b0]
mov ebp, dword [edi + 0xc]
test ebp, ebp
je 0x13d60a8
push ebp
call fcn.013ef39c
add esp, 4
mov ebx, eax
lea eax, [esp + 0xc]
push 0
push eax
push ebx
push ebp
push dword [esp + 0x10]
call dword [0x4834b0]
mov eax, dword [edi + 0xc]
cmp byte [eax + ebx - 1], 0xa
je 0x13d60a8
push 0
lea eax, [esp + 0x10]
push eax
push 1
push 0x406f97
push dword [esp + 0x10]
call dword [0x4834b0]
xor ebx, ebx
mov eax, edi
inc ebx
cmp dword [edi + 0x14], 0
je 0x13d61cb
xor ebx, ebx
xor ecx, ecx
mov eax, dword [eax + 0x18]
mov dword [esp + 4], ecx
mov ebp, dword [eax + ecx*4]
lea eax, [esp + 8]
push eax
push esi
call dword [0x483364]
mov eax, dword [esp + 8]
mov ecx, eax
and eax, 0xfffffff8
or ecx, 7
or eax, 3
cmp dword [ebp + 4], ebx
cmovne eax, ecx
push eax
push esi
call dword [0x48345c]
mov edi, dword [ebp]
push edi
call fcn.013ef39c
add esp, 4
push ebx
lea ecx, [esp + 0x10]
push ecx
push eax
push edi
push dword [esp + 0x10]
call dword [0x4834b0]
xor edi, edi
jmp 0x13d6112
mov edi, ecx
lea eax, [edi + edi*4]
mov dword [esp + 0xc], ebx
mov ecx, eax
sar ecx, 0x1f
shr ecx, 0x1e
add ecx, eax
sar ecx, 2
add ecx, 0x200
push ecx
push ebp
call fcn.013a316e
add esp, 8
mov eax, edi
mov ecx, dword [ebp + 8]
not eax
add eax, dword [ebp + 0xc]
add ecx, edi
push ebx
lea edx, [esp + 0x10]
push edx
push eax
push ecx
push esi
call dword [0x483444]
test eax, eax
je 0x13d617b
mov eax, dword [esp + 0xc]
test eax, eax
je 0x13d617b
mov edx, dword [ebp + 8]
lea ecx, [eax + edi]
cmp byte [edx + ecx - 1], 0xa
jne 0x13d6110
cmp byte [edx + ecx - 2], 0xd
lea eax, [eax + edi - 1]
lea edi, [ecx - 2]
cmovne edi, eax
jmp 0x13d617e
xor edi, edi
dec edi
push dword [esp + 8]
push esi
call dword [0x48345c]
cmp dword [ebp + 4], 0
jne 0x13d61a7
push 0
lea eax, [esp + 0x10]
push eax
push 2
push 0x402d2c
push dword [esp + 0x10]
call dword [0x4834b0]
test edi, edi
js 0x13d61c9
mov eax, dword [ebp + 8]
mov byte [eax + edi], 0
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 4]
inc ecx
cmp ecx, dword [eax + 0x14]
jb 0x13d60bb
xor ebx, ebx
inc ebx
jmp 0x13d61cb
xor ebx, ebx
mov ecx, dword [esp + 0x10]
call fcn.013df522
mov eax, ebx
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret
jmp 0x13d6012
push 2
call fcn.013e2e0b
add esp, 4
xor esi, esi
inc esi
push eax
push esi
push 0x22
push 0x4124ef
call fcn.013ee4d5
add esp, 0x10
push esi
call fcn.013d5ac8
int3
push dword [esp + 0xc]
push dword [esp + 0xc]
push dword [esp + 0xc]
call fcn.0139fe0c
add esp, 0xc
cmp eax, 0xffffffff
je 0x13d5f60
ret