Function at 0x4f4ba0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x24
push esi
mov esi, dword [esp + 0x30]
push edi
xor edi, edi
cmp esi, edi
jne 0x4f4bb7
pop edi
xor eax, eax
pop esi
add esp, 0x24
ret
push esi
call fcn.004f9b90
add esp, 4
test eax, eax
jne 0x4f4bca
pop edi
pop esi
add esp, 0x24
ret
mov eax, dword [esi]
mov ecx, 1
push ebx
cmp eax, ecx
push ebp
mov dword [esp + 0x10], edi
jne 0x4f4dd8
mov eax, dword [esp + 0x38]
mov ebp, dword [esi + 4]
cmp eax, ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x24], ecx
jle 0x4f4e88
lea ebx, [esp + 0x48]
cmp dword [esp + 0x10], edi
je 0x4f4e88
mov eax, dword [ebx + 8]
mov ecx, eax
and ecx, 0x20000000
cmp ecx, 0x20000000
jne 0x4f4d52
and eax, 0xdfffffff
cmp eax, reloc.WS2_32.dll_connect
mov dword [ebx + 8], eax
jne 0x4f4c8b
mov eax, dword [ebx]
lea edx, [esp + 0x18]
push edx
push eax
call fcn.004f8760
mov ecx, dword [esp + 0x20]
add esp, 8
test ecx, ecx
mov dword [esp + 0x28], edi
jbe 0x4f4cf8
mov esi, eax
mov eax, dword [esi]
test eax, eax
jne 0x4f4c5d
mov eax, 1
lea ecx, [esp + 0x28]
jmp 0x4f4c69
push eax
call fcn.004f8640
mov ecx, dword [esi]
add esp, 4
inc eax
lea edx, [esp + 0x14]
push 0
push edx
push eax
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4f4cf0
mov eax, dword [esp + 0x18]
inc edi
add esi, 4
cmp edi, eax
jae 0x4f4cf8
jmp 0x4f4c4c
cmp eax, reloc.WS2_32.dll_getpeername
jne 0x4f4d17
mov ecx, dword [ebx]
lea eax, [esp + 0x1c]
push eax
push ecx
call fcn.004f8760
mov ecx, dword [esp + 0x24]
add esp, 8
test ecx, ecx
mov dword [esp + 0x2c], edi
jbe 0x4f4cf8
mov esi, eax
mov eax, dword [esi]
test eax, eax
jne 0x4f4cc5
lea ecx, [esp + 0x2c]
mov eax, 4
jmp 0x4f4cce
lea ecx, [eax + 4]
mov eax, dword [eax + 4]
add eax, 4
lea edx, [esp + 0x14]
push 0
push edx
push eax
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4f4cf0
mov eax, dword [esp + 0x1c]
inc edi
add esi, 4
cmp edi, eax
jae 0x4f4cf8
jmp 0x4f4cb4
mov dword [esp + 0x10], 0
xor edi, edi
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x38]
inc eax
add ebx, 0xc
cmp eax, ecx
mov dword [esp + 0x24], eax
jge 0x4f4e88
jmp 0x4f4bfa
push eax
call fcn.004f9540
mov esi, eax
add esp, 4
cmp esi, edi
je 0x4f4cfa
mov ecx, dword [ebx]
lea eax, [esp + 0x30]
push eax
push ecx
call fcn.004f8760
mov ecx, dword [esp + 0x38]
add esp, 8
imul ecx, esi
lea edx, [esp + 0x14]
push edi
push edx
push ecx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4f4dca
jmp 0x4f4cfa
cmp eax, reloc.WS2_32.dll_connect
mov dword [esp + 0x20], edi
jne 0x4f4d7c
mov eax, dword [ebx]
cmp eax, edi
jne 0x4f4d6e
mov eax, 1
lea ecx, [esp + 0x20]
jmp 0x4f4db2
push eax
call fcn.004f8640
mov ecx, dword [ebx]
add esp, 4
inc eax
jmp 0x4f4db2
cmp eax, reloc.WS2_32.dll_getpeername
jne 0x4f4d9f
mov eax, dword [ebx]
cmp eax, edi
jne 0x4f4d94
mov eax, 4
lea ecx, [esp + 0x20]
jmp 0x4f4db2
lea ecx, [eax + 4]
mov eax, dword [eax + 4]
add eax, 4
jmp 0x4f4db2
push eax
call fcn.004f9540
add esp, 4
cmp eax, edi
je 0x4f4cfa
mov ecx, ebx
lea edx, [esp + 0x14]
push edi
push edx
push eax
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4f4dca
jmp 0x4f4cfa
pop ebp
mov dword [esp + 0xc], edi
mov eax, edi
pop ebx
pop edi
pop esi
add esp, 0x24
ret
cmp eax, 2
jne 0x4f4e88
mov eax, dword [esp + 0x38]
mov ebx, dword [esi + 4]
cmp eax, ecx
mov dword [esp + 0x10], ecx
jle 0x4f4e88
dec eax
lea ebp, [esp + 0x48]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 8]
mov ecx, eax
and ecx, 0x20000000
cmp ecx, 0x20000000
jne 0x4f4f26
and eax, 0xdfffffff
cmp eax, reloc.WS2_32.dll_connect
mov dword [ebp + 8], eax
jne 0x4f4e94
mov eax, dword [ebp]
lea edx, [esp + 0x38]
push edx
push eax
call fcn.004f8760
mov ecx, dword [esp + 0x40]
add esp, 8
test ecx, ecx
mov dword [esp + 0x30], edi
jbe 0x4f4e74
mov esi, eax
mov eax, dword [esi]
test eax, eax
jne 0x4f4e53
mov eax, 1
lea ecx, [esp + 0x30]
jmp 0x4f4e5f
push eax
call fcn.004f8640
mov ecx, dword [esi]
add esp, 4
inc eax
mov edx, dword [ebx]
push eax
push ecx
mov ecx, ebx
call dword [edx + 0x24]
mov eax, dword [esp + 0x38]
inc edi
add esi, 4
cmp edi, eax
jb 0x4f4e42
xor edi, edi
mov eax, dword [esp + 0x1c]
add ebp, 0xc
dec eax
mov dword [esp + 0x1c], eax
jne 0x4f4dfd
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x24
ret
cmp eax, reloc.WS2_32.dll_getpeername
jne 0x4f4eed
mov ecx, dword [ebp]
lea eax, [esp + 0x24]
push eax
push ecx
call fcn.004f8760
mov ecx, dword [esp + 0x2c]
add esp, 8
xor esi, esi
cmp ecx, edi
mov dword [esp + 0x2c], edi
jbe 0x4f4e76
mov edi, eax
mov eax, dword [edi]
test eax, eax
jne 0x4f4ecd
lea ecx, [esp + 0x2c]
mov eax, 4
jmp 0x4f4ed6
lea ecx, [eax + 4]
mov eax, dword [eax + 4]
add eax, 4
mov edx, dword [ebx]
push eax
push ecx
mov ecx, ebx
call dword [edx + 0x24]
mov eax, dword [esp + 0x24]
inc esi
add edi, 4
cmp esi, eax
jb 0x4f4ebc
jmp 0x4f4e74
push eax
call fcn.004f9540
mov esi, eax
add esp, 4
cmp esi, edi
je 0x4f4e76
mov ecx, dword [ebp]
lea eax, [esp + 0x28]
push eax
push ecx
call fcn.004f8760
mov ecx, dword [esp + 0x30]
mov edx, dword [ebx]
imul ecx, esi
add esp, 8
push ecx
push eax
mov ecx, ebx
call dword [edx + 0x24]
jmp 0x4f4e76
cmp eax, reloc.WS2_32.dll_connect
mov dword [esp + 0x20], edi
jne 0x4f4f6a
mov eax, dword [ebp]
cmp eax, edi
jne 0x4f4f4f
mov edx, dword [ebx]
mov eax, 1
lea ecx, [esp + 0x20]
push eax
push ecx
mov ecx, ebx
call dword [edx + 0x24]
jmp 0x4f4e76
push eax
call fcn.004f8640
mov ecx, dword [ebp]
mov edx, dword [ebx]
add esp, 4
inc eax
push eax
push ecx
mov ecx, ebx
call dword [edx + 0x24]
jmp 0x4f4e76
cmp eax, reloc.WS2_32.dll_getpeername
jne 0x4f4fa5
mov eax, dword [ebp]
cmp eax, edi
jne 0x4f4f8f
mov edx, dword [ebx]
mov eax, 4
lea ecx, [esp + 0x20]
push eax
push ecx
mov ecx, ebx
call dword [edx + 0x24]
jmp 0x4f4e76
lea ecx, [eax + 4]
mov edx, dword [ebx]
mov eax, dword [ecx]
add eax, 4
push eax
push ecx
mov ecx, ebx
call dword [edx + 0x24]
jmp 0x4f4e76
push eax
call fcn.004f9540
add esp, 4
cmp eax, edi
je 0x4f4e76
mov edx, dword [ebx]
mov ecx, ebp
push eax
push ecx
mov ecx, ebx
call dword [edx + 0x24]
jmp 0x4f4e76