Function at 0x5637b0
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 0x5637c7
pop edi
xor eax, eax
pop esi
add esp, 0x24
ret
push esi
call fcn.00568d50
add esp, 4
test eax, eax
jne 0x5637da
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 0x5639e8
mov eax, dword [esp + 0x38]
mov ebp, dword [esi + 4]
cmp eax, ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x24], ecx
jle 0x563a98
lea ebx, [esp + 0x48]
cmp dword [esp + 0x10], edi
je 0x563a98
mov eax, dword [ebx + 8]
mov ecx, eax
and ecx, 0x20000000
cmp ecx, 0x20000000
jne 0x563962
and eax, 0xdfffffff
cmp eax, reloc.WS2_32.dll_connect
mov dword [ebx + 8], eax
jne 0x56389b
mov eax, dword [ebx]
lea edx, [esp + 0x18]
push edx
push eax
call fcn.005679b0
mov ecx, dword [esp + 0x20]
add esp, 8
test ecx, ecx
mov dword [esp + 0x28], edi
jbe 0x563908
mov esi, eax
mov eax, dword [esi]
test eax, eax
jne 0x56386d
mov eax, 1
lea ecx, [esp + 0x28]
jmp 0x563879
push eax
call fcn.00567bb0
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 0x563900
mov eax, dword [esp + 0x18]
inc edi
add esi, 4
cmp edi, eax
jae 0x563908
jmp 0x56385c
cmp eax, reloc.WS2_32.dll_getpeername
jne 0x563927
mov ecx, dword [ebx]
lea eax, [esp + 0x1c]
push eax
push ecx
call fcn.005679b0
mov ecx, dword [esp + 0x24]
add esp, 8
test ecx, ecx
mov dword [esp + 0x2c], edi
jbe 0x563908
mov esi, eax
mov eax, dword [esi]
test eax, eax
jne 0x5638d5
lea ecx, [esp + 0x2c]
mov eax, 4
jmp 0x5638de
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 0x563900
mov eax, dword [esp + 0x1c]
inc edi
add esi, 4
cmp edi, eax
jae 0x563908
jmp 0x5638c4
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 0x563a98
jmp 0x56380a
push eax
call fcn.005680e0
mov esi, eax
add esp, 4
cmp esi, edi
je 0x56390a
mov ecx, dword [ebx]
lea eax, [esp + 0x30]
push eax
push ecx
call fcn.005679b0
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 0x5639da
jmp 0x56390a
cmp eax, reloc.WS2_32.dll_connect
mov dword [esp + 0x20], edi
jne 0x56398c
mov eax, dword [ebx]
cmp eax, edi
jne 0x56397e
mov eax, 1
lea ecx, [esp + 0x20]
jmp 0x5639c2
push eax
call fcn.00567bb0
mov ecx, dword [ebx]
add esp, 4
inc eax
jmp 0x5639c2
cmp eax, reloc.WS2_32.dll_getpeername
jne 0x5639af
mov eax, dword [ebx]
cmp eax, edi
jne 0x5639a4
mov eax, 4
lea ecx, [esp + 0x20]
jmp 0x5639c2
lea ecx, [eax + 4]
mov eax, dword [eax + 4]
add eax, 4
jmp 0x5639c2
push eax
call fcn.005680e0
add esp, 4
cmp eax, edi
je 0x56390a
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 0x5639da
jmp 0x56390a
pop ebp
mov dword [esp + 0xc], edi
mov eax, edi
pop ebx
pop edi
pop esi
add esp, 0x24
ret
cmp eax, 2
jne 0x563a98
mov eax, dword [esp + 0x38]
mov ebx, dword [esi + 4]
cmp eax, ecx
mov dword [esp + 0x10], ecx
jle 0x563a98
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 0x563b36
and eax, 0xdfffffff
cmp eax, reloc.WS2_32.dll_connect
mov dword [ebp + 8], eax
jne 0x563aa4
mov eax, dword [ebp]
lea edx, [esp + 0x38]
push edx
push eax
call fcn.005679b0
mov ecx, dword [esp + 0x40]
add esp, 8
test ecx, ecx
mov dword [esp + 0x30], edi
jbe 0x563a84
mov esi, eax
mov eax, dword [esi]
test eax, eax
jne 0x563a63
mov eax, 1
lea ecx, [esp + 0x30]
jmp 0x563a6f
push eax
call fcn.00567bb0
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 0x563a52
xor edi, edi
mov eax, dword [esp + 0x1c]
add ebp, 0xc
dec eax
mov dword [esp + 0x1c], eax
jne 0x563a0d
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 0x563afd
mov ecx, dword [ebp]
lea eax, [esp + 0x24]
push eax
push ecx
call fcn.005679b0
mov ecx, dword [esp + 0x2c]
add esp, 8
xor esi, esi
cmp ecx, edi
mov dword [esp + 0x2c], edi
jbe 0x563a86
mov edi, eax
mov eax, dword [edi]
test eax, eax
jne 0x563add
lea ecx, [esp + 0x2c]
mov eax, 4
jmp 0x563ae6
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 0x563acc
jmp 0x563a84
push eax
call fcn.005680e0
mov esi, eax
add esp, 4
cmp esi, edi
je 0x563a86
mov ecx, dword [ebp]
lea eax, [esp + 0x28]
push eax
push ecx
call fcn.005679b0
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 0x563a86
cmp eax, reloc.WS2_32.dll_connect
mov dword [esp + 0x20], edi
jne 0x563b7a
mov eax, dword [ebp]
cmp eax, edi
jne 0x563b5f
mov edx, dword [ebx]
mov eax, 1
lea ecx, [esp + 0x20]
push eax
push ecx
mov ecx, ebx
call dword [edx + 0x24]
jmp 0x563a86
push eax
call fcn.00567bb0
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 0x563a86
cmp eax, reloc.WS2_32.dll_getpeername
jne 0x563bb5
mov eax, dword [ebp]
cmp eax, edi
jne 0x563b9f
mov edx, dword [ebx]
mov eax, 4
lea ecx, [esp + 0x20]
push eax
push ecx
mov ecx, ebx
call dword [edx + 0x24]
jmp 0x563a86
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 0x563a86
push eax
call fcn.005680e0
add esp, 4
cmp eax, edi
je 0x563a86
mov edx, dword [ebx]
mov ecx, ebp
push eax
push ecx
mov ecx, ebx
call dword [edx + 0x24]
jmp 0x563a86