Function at 0x4a48a0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x14
push edi
mov edi, dword [esp + 0x20]
test edi, edi
jne 0x4a48b3
xor eax, eax
pop edi
add esp, 0x14
ret
push edi
call fcn.004a82b0
add esp, 4
test eax, eax
jne 0x4a48c5
pop edi
add esp, 0x14
ret
mov eax, dword [edi]
mov ecx, 1
push ebx
push ebp
cmp eax, ecx
push esi
mov dword [esp + 0x10], 0
jne 0x4a497b
mov eax, dword [edi + 4]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x28]
cmp eax, ecx
mov edi, ecx
jle 0x4a4adb
lea ebx, [esp + 0x38]
mov eax, dword [ebx + 8]
xor ebp, ebp
cmp eax, reloc.WS2_32.dll_connect
jne 0x4a490c
mov esi, dword [ebx]
jmp 0x4a4920
push ebx
call fcn.004a8110
mov esi, eax
add esp, 4
test esi, esi
je 0x4a4963
mov ebp, 1
push esi
call dword [0x679bfc]
add esp, 4
test eax, eax
jle 0x4a494a
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x18]
push 0
push ecx
push eax
push esi
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4a494a
mov dword [esp + 0x10], eax
test ebp, ebp
je 0x4a4957
push esi
call fcn.004b7efe
add esp, 4
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4a4adb
mov eax, dword [esp + 0x28]
inc edi
add ebx, 0xc
cmp edi, eax
jl 0x4a48fc
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x14
ret
cmp eax, 2
jne 0x4a49fe
mov eax, dword [esp + 0x28]
mov edi, dword [edi + 4]
cmp eax, ecx
mov dword [esp + 0x10], ecx
jle 0x4a4adb
dec eax
lea ebx, [esp + 0x38]
mov dword [esp + 0x28], eax
mov eax, dword [ebx + 8]
xor ebp, ebp
cmp eax, reloc.WS2_32.dll_connect
jne 0x4a49ac
mov esi, dword [ebx]
jmp 0x4a49c0
push ebx
call fcn.004a8110
mov esi, eax
add esp, 4
test esi, esi
je 0x4a49e4
mov ebp, 1
push esi
call dword [0x679bfc]
add esp, 4
test eax, eax
jle 0x4a49d7
mov edx, dword [edi]
push eax
push esi
mov ecx, edi
call dword [edx + 0x24]
test ebp, ebp
je 0x4a49e4
push esi
call fcn.004b7efe
add esp, 4
mov eax, dword [esp + 0x28]
add ebx, 0xc
dec eax
mov dword [esp + 0x28], eax
jne 0x4a499c
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x14
ret
cmp eax, 3
jne 0x4a4adb
mov eax, dword [esp + 0x28]
mov ebp, dword [edi + 4]
cmp eax, ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], ecx
jle 0x4a4adb
lea ebx, [esp + 0x38]
mov dword [esp + 0x1c], ebx
mov eax, dword [ebx + 8]
mov dword [esp + 0x14], 0
cmp eax, reloc.WS2_32.dll_connect
jne 0x4a4a3c
mov esi, dword [ebx]
jmp 0x4a4a53
push ebx
call fcn.004a8110
mov esi, eax
add esp, 4
test esi, esi
je 0x4a4abf
mov dword [esp + 0x14], 1
push esi
call dword [0x679bfc]
mov ebx, eax
add esp, 4
test ebx, ebx
jle 0x4a4aa2
push 1
push 0
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [edi + 0x130]
lea ecx, [edi + 0xc]
push ecx
lea ecx, [edi + 0x2c]
push edx
push ecx
push ebx
push esi
push eax
call fcn.004a6ef0
add esp, 0x18
lea edx, [esp + 0x20]
push 0
push edx
push ebx
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4a4aa2
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4a4ab3
push esi
call fcn.004b7efe
add esp, 4
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4a4adb
mov ebx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
inc eax
add ebx, 0xc
cmp eax, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ebx
jl 0x4a4a26
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x14
ret