Function at 0x10197da
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x138
mov ecx, dword [ebp + 8]
mov eax, dword [reloc.msvcrt.dll___p__commode]
xor eax, dword [ebp + 4]
push ebx
push edi
lea edi, [ecx + 0x60]
mov edx, dword [edi]
xor ebx, ebx
cmp edx, ebx
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], edx
je 0x1019914
mov al, byte [edx + 8]
cmp al, 5
push esi
jne 0x10196d4
mov esi, 0x1002990
jmp 0x10196ec
cmp al, 6
jne 0x10196df
mov esi, 0x1002988
jmp 0x10196ec
cmp al, 2
jne 0x1019903
mov esi, 0x100297c
mov ecx, dword [ecx + 0x20]
mov ecx, dword [ecx + 4]
sub ecx, 0xa
je 0x10197fa
sub ecx, 7
je 0x10197d1
dec ecx
je 0x101971c
push 0x100296c
push dword [ebp + 0xc]
call dword [sym.imp.msvcrt.dll_sprintf]
pop ecx
pop ecx
jmp 0x10198eb
lea ecx, [ebp - 0x70]
push ecx
movzx eax, al
push edx
push eax
call fcn.01019522
lea eax, [ebp - 0x70]
push eax
push esi
push 0x1002964
push dword [ebp + 0xc]
call dword [sym.imp.msvcrt.dll_sprintf]
mov eax, dword [ebp + 8]
add esp, 0x10
cmp dword [eax + 0x5c], 0
jle 0x10198eb
add eax, 0x64
mov dword [ebp - 8], eax
lea eax, reloc.msvcrt.dll___p__commode
push eax
mov eax, dword [ebp - 8]
push dword [eax]
call fcn.01019605
mov eax, dword [ebp + 0xc]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x101976a
sub eax, ecx
mov ecx, eax
lea eax, reloc.msvcrt.dll___p__commode
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x101977e
sub eax, esi
add eax, ecx
cmp eax, 0xbfc
ja 0x10198eb
lea eax, reloc.msvcrt.dll___p__commode
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x101979c
mov edi, dword [ebp + 0xc]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10197a9
add dword [ebp - 8], 0xc
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp + 8]
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
cmp ebx, dword [eax + 0x5c]
jl 0x1019753
jmp 0x10198eb
lea ecx, [ebp - 0x70]
push ecx
movzx eax, al
push edx
push eax
call fcn.01019522
lea eax, [ebp - 0x70]
push eax
push esi
push 0x1002964
push dword [ebp + 0xc]
call dword [sym.imp.msvcrt.dll_sprintf]
add esp, 0x10
jmp 0x10198eb
push esi
push 0x100295c
push dword [ebp + 0xc]
call dword [sym.imp.msvcrt.dll_sprintf]
mov eax, dword [ebp + 8]
add esp, 0xc
cmp dword [eax + 0x5c], ebx
mov dword [ebp - 8], ebx
jle 0x10198eb
mov ebx, edi
mov esi, dword [ebx + 4]
lea eax, [ebp - 0x70]
push eax
mov eax, dword [ebp - 0xc]
movzx eax, byte [eax + 8]
push dword [ebx]
push eax
call fcn.01019522
lea eax, reloc.msvcrt.dll___p__commode
push eax
push esi
call fcn.01019605
mov eax, dword [ebp + 0xc]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1019846
sub eax, ecx
mov edi, eax
lea eax, reloc.msvcrt.dll___p__commode
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x101985a
sub eax, ecx
mov ecx, eax
lea eax, [ebp - 0x70]
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x101986b
sub eax, esi
add eax, ecx
add eax, edi
cmp eax, 0xbfc
ja 0x10198eb
lea eax, [ebp - 0x70]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1019884
mov edi, dword [ebp + 0xc]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1019891
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, reloc.msvcrt.dll___p__commode
rep movsb byte es:[edi], byte [esi]
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10198b1
mov edi, dword [ebp + 0xc]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10198c0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp + 8]
and ecx, 3
inc dword [ebp - 8]
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 8]
add ebx, 0xc
cmp ecx, dword [eax + 0x5c]
jl 0x101981d
mov esi, dword [ebp + 0xc]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10198f3
sub eax, edx
mov byte [eax + esi - 1], WSASocketW
jmp 0x1019913
push 0x1002940
push dword [ebp + 0xc]
call dword [sym.imp.msvcrt.dll_sprintf]
pop ecx
pop ecx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
pop ebx
call fcn.0101ed84
leave
ret 8