Function at 0x555880
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
sub esp, 0x38
mov eax, dword [0x758898]
xor eax, esp
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x5c]
push ebx
mov ebx, dword [esp + 0x58]
push ebp
push esi
mov esi, ecx
mov ecx, dword [esp + 0x4c]
push edi
xor edi, edi
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x68]
mov dword [ecx], edi
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x70]
mov dword [edx], edi
mov dword [eax], edi
mov dword [eax + 4], edi
mov ebp, dword [ebx]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x10], edi
mov dword [esp + 0x18], edi
cmp ebp, edi
je 0x555da3
cmp byte [esi + 0x65], 0
je 0x555af1
jmp 0x5558f0
cmp byte [esi + 0x65], 1
jne 0x55599f
xor eax, eax
mov dword [esi + 0x78], eax
mov dword [esi + 0x7c], eax
movsx eax, byte [esi + 0x66]
mov ebx, 4
sub ebx, eax
cmp ebx, ebp
jb 0x555913
mov ebx, ebp
mov edx, dword [esp + 0x1c]
mov edi, dword [esp + 0x10]
push ebx
add edx, edi
push edx
lea eax, [eax + esi + 0x68]
push eax
call fcn.00621d10
add byte [esi + 0x66], bl
mov eax, dword [esp + 0x38]
add dword [eax], ebx
mov eax, dword [esp + 0x20]
sub dword [eax], ebx
add edi, ebx
add esp, 0xc
sub ebp, ebx
cmp byte [esi + 0x66], 4
mov dword [esp + 0x10], edi
jne 0x555da3
mov eax, dword [esi + 0x68]
push eax
call dword [sym.imp.WS2_32.dll_ntohl]
cdq
mov dword [esi + 0x78], eax
mov dword [esi + 0x7c], edx
mov ecx, edx
cmp eax, 1
jne 0x55596f
test ecx, ecx
jne 0x55596f
mov byte [esi + 0x64], 0xc
jmp 0x555993
sub eax, 8
mov edx, 0
sbb ecx, edx
cmp ecx, edx
mov byte [esi + 0x64], 4
mov dword [esi + 0x78], eax
mov dword [esi + 0x7c], ecx
jg 0x555993
jl 0x55598d
cmp eax, edx
jae 0x555993
mov dword [esi + 0x78], edx
mov dword [esi + 0x7c], edx
mov ebx, dword [esp + 0x14]
mov byte [esi + 0x65], 2
mov byte [esi + 0x67], 0
cmp byte [esi + 0x65], 2
jne 0x555a74
movsx eax, byte [esi + 0x67]
movsx ebx, byte [esi + 0x64]
sub ebx, eax
cmp ebx, ebp
jb 0x5559b9
mov ebx, ebp
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x10]
push ebx
add ecx, edi
push ecx
lea edx, [eax + esi + 0x6c]
push edx
call fcn.00621d10
add byte [esi + 0x67], bl
mov eax, dword [esp + 0x38]
add dword [eax], ebx
mov eax, dword [esp + 0x20]
sub dword [eax], ebx
mov al, byte [esi + 0x64]
add edi, ebx
add esp, 0xc
sub ebp, ebx
mov dword [esp + 0x10], edi
cmp al, byte [esi + 0x67]
jne 0x555da3
mov ecx, dword [esi + 0x6c]
mov dword [esp + 0x3c], ecx
mov byte [esp + 0x40], 0
cmp al, 0xc
jne 0x555a33
lea edx, [esi + 0x70]
push edx
call fcn.00554a00
add esp, 4
sub eax, 0x10
mov edi, 0
sbb edx, edi
cmp edx, edi
mov dword [esi + 0x78], eax
mov dword [esi + 0x7c], edx
jg 0x555a35
jl 0x555a2b
cmp eax, edi
jae 0x555a35
mov dword [esi + 0x78], edi
mov dword [esi + 0x7c], edi
jmp 0x555a35
xor edi, edi
mov ecx, str.mdat
lea eax, [esp + 0x3c]
mov edi, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x555a60
test dl, dl
je 0x555a5c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x555a60
add eax, 2
add ecx, 2
test dl, dl
jne 0x555a40
xor eax, eax
jmp 0x555a65
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, edi
je 0x555ac6
mov ebx, dword [esp + 0x14]
mov byte [esi + 0x65], 3
mov dword [esi + 0x60], edi
cmp byte [esi + 0x65], 3
jne 0x5558f0
mov ecx, dword [esi + 0x60]
mov eax, dword [esi + 0x78]
sub eax, ecx
cmp eax, ebp
jb 0x555a8c
mov eax, ebp
add dword [esp + 0x10], eax
add ecx, eax
mov dword [esi + 0x60], ecx
sub dword [ebx], eax
mov ecx, dword [esp + 0x2c]
add dword [ecx], eax
mov edx, dword [esi + 0x78]
sub ebp, eax
mov eax, dword [esi + 0x60]
xor ecx, ecx
cmp edx, eax
jne 0x555da3
mov eax, dword [esi + 0x7c]
cmp eax, ecx
jne 0x555da3
mov byte [esi + 0x65], 1
mov byte [esi + 0x66], cl
jmp 0x5558f0
mov eax, dword [esi + 0x78]
mov ecx, dword [esi + 0x7c]
mov edx, eax
or edx, ecx
je 0x555ae9
mov edx, dword [esp + 0x38]
mov dword [edx], eax
mov dword [edx + 4], ecx
mov eax, dword [esi + 0x78]
mov ecx, dword [esi + 0x7c]
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], ecx
mov ebx, dword [esp + 0x14]
mov byte [esi + 0x65], 0
mov edx, dword [esp + 0x28]
mov edx, dword [edx]
mov ecx, dword [esp + 0x54]
mov eax, dword [esp + 0x58]
xor edi, edi
sub ecx, edx
sbb eax, edi
sub ecx, dword [esp + 0x5c]
sbb eax, dword [esp + 0x60]
cmp eax, edi
jg 0x555b29
jl 0x555b17
cmp ecx, ebp
jae 0x555b29
mov eax, dword [esp + 0x54]
sub eax, edx
sub eax, dword [esp + 0x5c]
mov ecx, eax
sub ecx, ebp
add dword [ebx], ecx
mov ebp, eax
cmp byte [esi + 0x5d], 0
je 0x555c78
mov eax, dword [esi + 0x40]
mov edi, 0xb
sub edi, eax
mov dword [esp + 0x30], eax
cmp edi, ebp
jb 0x555b47
mov edi, ebp
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esi + 0x40]
add edx, eax
push edi
push edx
lea edx, [ecx + esi + 0x20]
push edx
call fcn.00621d10
add dword [esi + 0x40], edi
mov eax, dword [esi + 0x40]
add dword [esp + 0x1c], edi
add esp, 0xc
sub ebp, edi
cmp eax, 0xb
jne 0x555da1
movzx ecx, byte [esi + 0x23]
mov edi, dword [sym.imp.WS2_32.dll_ntohl]
xor eax, eax
mov word [esp + 0x21], ax
mov byte [esp + 0x23], al
movzx eax, word [esi + 0x21]
mov word [esp + 0x21], ax
mov byte [esp + 0x23], cl
mov byte [esp + 0x20], 0
mov edx, dword [esp + 0x20]
push edx
mov byte [esi + 0x5d], 0
mov dword [esi + 0x40], 0
call edi
movzx ecx, byte [esi + 0x26]
mov dword [esi + 0x54], eax
xor eax, eax
mov word [esp + 0x25], ax
mov byte [esp + 0x27], al
movzx eax, word [esi + 0x24]
lea ebx, [esi + 0x24]
mov word [esp + 0x25], ax
mov byte [esp + 0x27], cl
mov byte [esp + 0x24], 0
mov edx, dword [esp + 0x24]
push edx
call edi
mov ecx, dword [esi + 0x58]
mov edi, eax
movsx eax, byte [esi + 0x27]
shl eax, 0x18
or edi, eax
mov eax, dword [esi + 0x4c]
add ecx, edi
cmp ecx, eax
jae 0x555c01
sub eax, edi
mov byte [esi + 0x5c], 1
mov dword [esi + 0x58], eax
jmp 0x555c18
cmp eax, edi
ja 0x555c10
mov byte [esi + 0x5c], 0
mov dword [esi + 0x58], 0
mov edx, dword [esi + 0x58]
add edx, edi
mov dword [esi + 0x4c], edx
cmp byte [esi + 0x5c], 0
je 0x555c39
mov eax, dword [esi + 0x58]
add eax, edi
push eax
push ebx
call fcn.00554a40
mov ecx, dword [esi + 0x58]
add ebx, eax
add ecx, edi
add esp, 8
shr ecx, 0x18
mov byte [ebx], cl
mov ecx, dword [esp + 0x34]
push 0
lea edx, [esp + 0x1c]
push edx
push 0xb
lea eax, [esi + 0x20]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x555d8a
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
add dword [ecx], eax
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x14]
add dword [ecx], edx
cmp eax, 0xb
jne 0x555d8a
mov ebx, ecx
cmp byte [esi + 0x5e], 0
jne 0x555ce2
mov edi, dword [esi + 0x54]
sub edi, dword [esi + 0x50]
cmp edi, ebp
jb 0x555c8a
mov edi, ebp
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
push 0
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x3c]
push edi
add ecx, edx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x555d8a
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
add dword [ecx], eax
cmp edi, eax
jne 0x555d8a
add dword [esi + 0x50], edi
mov eax, dword [esi + 0x50]
add dword [esp + 0x10], edi
sub ebp, edi
cmp dword [esi + 0x54], eax
jne 0x555da3
mov byte [esi + 0x5e], 1
mov dword [esi + 0x50], 0
mov eax, dword [esi + 0x44]
mov edi, 4
sub edi, eax
mov dword [esp + 0x30], eax
cmp edi, ebp
jb 0x555cf6
mov edi, ebp
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esi + 0x44]
add ecx, edx
push edi
push ecx
lea ecx, [eax + esi + 0x2b]
push ecx
call fcn.00621d10
add dword [esi + 0x44], edi
mov eax, dword [esi + 0x44]
add dword [esp + 0x1c], edi
add esp, 0xc
sub ebp, edi
cmp eax, 4
jne 0x555da1
mov eax, dword [esi + 0x2b]
lea edi, [esi + 0x2b]
push eax
mov byte [esi + 0x5e], 0
mov byte [esi + 0x5d], 1
mov dword [esi + 0x44], 0
call dword [sym.imp.WS2_32.dll_ntohl]
mov ecx, dword [esi + 0x54]
add ecx, 0xb
cmp ecx, eax
je 0x555d52
push ecx
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [edi], eax
mov eax, dword [esp + 0x34]
push 0
lea edx, [esp + 0x1c]
push edx
push 4
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x555d8a
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
add dword [ecx], eax
mov ecx, dword [esp + 0x30]
add dword [ebx], ecx
cmp eax, 4
jne 0x555d8a
test ebp, ebp
jne 0x5558e1
jmp 0x555da3
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.0062016f
add esp, 0x38
ret 0x28
sub dword [ebx], edi
mov ecx, dword [esp + 0x44]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
mov eax, 1
call fcn.0062016f
add esp, 0x38
ret 0x28