Function at 0x4e5a00
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x28
push esi
mov esi, dword [esp + 0x34]
push edi
xor edi, edi
cmp esi, edi
jne 0x4e5a17
pop edi
xor eax, eax
pop esi
add esp, 0x28
ret
push esi
call fcn.004e7fc0
add esp, 4
test eax, eax
jne 0x4e5a2a
pop edi
pop esi
add esp, 0x28
ret
mov eax, dword [esi]
mov ecx, 1
push ebx
cmp eax, ecx
push ebp
mov dword [esp + 0x10], edi
jne 0x4e5c7d
mov eax, dword [esi + 4]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x3c]
cmp eax, ecx
mov dword [esp + 0x28], ecx
jle 0x4e5e49
lea ebx, [esp + 0x4c]
cmp dword [esp + 0x10], edi
je 0x4e5e49
mov eax, dword [ebx + 8]
mov ecx, eax
and ecx, 0x20000000
cmp ecx, 0x20000000
jne 0x4e5bc3
and eax, 0xdfffffff
cmp eax, reloc.WS2_32.dll_connect
mov dword [ebx + 8], eax
jne 0x4e5b02
mov eax, dword [ebx]
lea edx, [esp + 0x1c]
push edx
push eax
call fcn.004e70b0
mov ecx, dword [esp + 0x24]
add esp, 8
xor ebp, ebp
cmp ecx, edi
mov dword [esp + 0x2c], edi
jbe 0x4e5c3c
mov esi, eax
mov edx, dword [esi]
cmp edx, edi
jne 0x4e5ac3
mov ecx, 1
lea edx, [esp + 0x2c]
jmp 0x4e5ace
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
xor edi, edi
lea eax, [esp + 0x18]
push edi
push eax
push ecx
mov ecx, dword [esp + 0x20]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4e5af9
mov eax, dword [esp + 0x1c]
inc ebp
add esi, 4
cmp ebp, eax
jae 0x4e5c3c
jmp 0x4e5ab2
mov dword [esp + 0x10], edi
jmp 0x4e5c3c
cmp eax, reloc.WS2_32.dll_getpeername
jne 0x4e5b7c
mov eax, dword [ebx]
lea edx, [esp + 0x20]
push edx
push eax
call fcn.004e70b0
mov ecx, dword [esp + 0x28]
add esp, 8
test ecx, ecx
mov dword [esp + 0x30], edi
jbe 0x4e5c3c
mov esi, eax
mov eax, dword [esi]
test eax, eax
jne 0x4e5b3c
lea ecx, [esp + 0x30]
mov eax, 4
jmp 0x4e5b45
lea ecx, [eax + 4]
mov eax, dword [eax + 4]
add eax, 4
lea edx, [esp + 0x18]
push 0
push edx
push eax
mov eax, dword [esp + 0x20]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4e5b6f
mov eax, dword [esp + 0x20]
inc edi
add esi, 4
cmp edi, eax
jae 0x4e5c3c
jmp 0x4e5b2b
mov dword [esp + 0x10], 0
jmp 0x4e5c3c
push eax
call fcn.004e7ac0
mov esi, eax
add esp, 4
cmp esi, edi
je 0x4e5c3c
mov edx, dword [ebx]
lea ecx, [esp + 0x34]
push ecx
push edx
call fcn.004e70b0
mov ecx, dword [esp + 0x3c]
add esp, 8
imul ecx, esi
lea edx, [esp + 0x18]
push edi
push edx
push ecx
push eax
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4e5c5b
jmp 0x4e5c3c
cmp eax, reloc.WS2_32.dll_connect
mov dword [esp + 0x24], edi
jne 0x4e5bf2
mov edx, dword [ebx]
cmp edx, edi
jne 0x4e5bdf
mov eax, 1
lea ecx, [esp + 0x24]
jmp 0x4e5c24
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov eax, ecx
mov ecx, edx
inc eax
jmp 0x4e5c24
cmp eax, reloc.WS2_32.dll_getpeername
jne 0x4e5c15
mov ecx, dword [ebx]
cmp ecx, edi
jne 0x4e5c0a
mov eax, 4
lea ecx, [esp + 0x24]
jmp 0x4e5c24
mov eax, dword [ecx + 4]
add ecx, 4
add eax, 4
jmp 0x4e5c24
push eax
call fcn.004e7ac0
add esp, 4
cmp eax, edi
je 0x4e5c3c
mov ecx, ebx
lea edx, [esp + 0x18]
push 0
push edx
push eax
mov eax, dword [esp + 0x20]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4e5c69
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x3c]
inc eax
add ebx, 0xc
cmp eax, ecx
mov dword [esp + 0x28], eax
jge 0x4e5e49
xor edi, edi
jmp 0x4e5a5e
pop ebp
mov dword [esp + 0xc], edi
mov eax, edi
pop ebx
pop edi
pop esi
add esp, 0x28
ret
pop ebp
mov dword [esp + 0xc], 0
mov eax, dword [esp + 0xc]
pop ebx
pop edi
pop esi
add esp, 0x28
ret
cmp eax, 2
jne 0x4e5e49
mov eax, dword [esp + 0x3c]
mov ebp, dword [esi + 4]
cmp eax, ecx
mov dword [esp + 0x10], ecx
jle 0x4e5e49
lea edi, [esp + 0x4c]
dec eax
mov dword [esp + 0x3c], edi
mov dword [esp + 0x1c], eax
mov eax, dword [edi + 8]
mov ecx, eax
and ecx, 0x20000000
cmp ecx, 0x20000000
jne 0x4e5dc0
and eax, 0xdfffffff
cmp eax, reloc.WS2_32.dll_connect
mov dword [edi + 8], eax
jne 0x4e5d2b
mov eax, dword [edi]
lea edx, [esp + 0x28]
push edx
push eax
call fcn.004e70b0
mov ecx, dword [esp + 0x30]
xor esi, esi
add esp, 8
cmp ecx, esi
mov dword [esp + 0x34], esi
jbe 0x4e5e33
mov ebx, eax
mov edx, dword [ebx]
test edx, edx
jne 0x4e5d01
mov ecx, 1
lea edx, [esp + 0x34]
jmp 0x4e5d10
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edi, dword [esp + 0x3c]
not ecx
mov eax, dword [ebp]
push ecx
push edx
mov ecx, ebp
call dword [eax + 0x24]
mov eax, dword [esp + 0x28]
inc esi
add ebx, 4
cmp esi, eax
jb 0x4e5cf0
jmp 0x4e5e33
cmp eax, reloc.WS2_32.dll_getpeername
jne 0x4e5d8f
mov edx, dword [edi]
lea ecx, [esp + 0x24]
push ecx
push edx
call fcn.004e70b0
mov ecx, dword [esp + 0x2c]
xor esi, esi
add esp, 8
cmp ecx, esi
mov dword [esp + 0x30], esi
jbe 0x4e5e33
mov edi, eax
mov eax, dword [edi]
test eax, eax
jne 0x4e5d67
lea ecx, [esp + 0x30]
mov eax, 4
jmp 0x4e5d70
lea ecx, [eax + 4]
mov eax, dword [eax + 4]
add eax, 4
mov edx, dword [ebp]
push eax
push ecx
mov ecx, ebp
call dword [edx + 0x24]
mov eax, dword [esp + 0x24]
inc esi
add edi, 4
cmp esi, eax
jb 0x4e5d56
mov edi, dword [esp + 0x3c]
jmp 0x4e5e33
push eax
call fcn.004e7ac0
mov esi, eax
add esp, 4
test esi, esi
je 0x4e5e33
mov ecx, dword [edi]
lea eax, [esp + 0x2c]
push eax
push ecx
call fcn.004e70b0
mov ecx, dword [esp + 0x34]
add esp, 8
imul ecx, esi
mov edx, dword [ebp]
push ecx
push eax
jmp 0x4e5e2e
cmp eax, reloc.WS2_32.dll_connect
mov dword [esp + 0x20], 0
jne 0x4e5df7
mov edx, dword [edi]
test edx, edx
jne 0x4e5de0
mov eax, 1
lea ecx, [esp + 0x20]
jmp 0x4e5e29
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edi, dword [esp + 0x3c]
not ecx
dec ecx
mov eax, ecx
mov ecx, edx
inc eax
jmp 0x4e5e29
cmp eax, reloc.WS2_32.dll_getpeername
jne 0x4e5e1a
mov ecx, dword [edi]
test ecx, ecx
jne 0x4e5e0f
mov eax, 4
lea ecx, [esp + 0x20]
jmp 0x4e5e29
mov eax, dword [ecx + 4]
add ecx, 4
add eax, 4
jmp 0x4e5e29
push eax
call fcn.004e7ac0
add esp, 4
test eax, eax
je 0x4e5e33
mov ecx, edi
mov edx, dword [ebp]
push eax
push ecx
mov ecx, ebp
call dword [edx + 0x24]
mov eax, dword [esp + 0x1c]
add edi, 0xc
dec eax
mov dword [esp + 0x3c], edi
mov dword [esp + 0x1c], eax
jne 0x4e5ca6
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x28
ret