Function at 0x555890
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 0x555db3
cmp byte [esi + 0x65], 0
je 0x555b01
jmp 0x555900
cmp byte [esi + 0x65], 1
jne 0x5559af
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 0x555923
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.00621de0
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 0x555db3
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 0x55597f
test ecx, ecx
jne 0x55597f
mov byte [esi + 0x64], 0xc
jmp 0x5559a3
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 0x5559a3
jl 0x55599d
cmp eax, edx
jae 0x5559a3
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 0x555a84
movsx eax, byte [esi + 0x67]
movsx ebx, byte [esi + 0x64]
sub ebx, eax
cmp ebx, ebp
jb 0x5559c9
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.00621de0
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 0x555db3
mov ecx, dword [esi + 0x6c]
mov dword [esp + 0x3c], ecx
mov byte [esp + 0x40], 0
cmp al, 0xc
jne 0x555a43
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 0x555a45
jl 0x555a3b
cmp eax, edi
jae 0x555a45
mov dword [esi + 0x78], edi
mov dword [esi + 0x7c], edi
jmp 0x555a45
xor edi, edi
mov ecx, str.mdat
lea eax, [esp + 0x3c]
mov edi, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x555a70
test dl, dl
je 0x555a6c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x555a70
add eax, 2
add ecx, 2
test dl, dl
jne 0x555a50
xor eax, eax
jmp 0x555a75
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, edi
je 0x555ad6
mov ebx, dword [esp + 0x14]
mov byte [esi + 0x65], 3
mov dword [esi + 0x60], edi
cmp byte [esi + 0x65], 3
jne 0x555900
mov ecx, dword [esi + 0x60]
mov eax, dword [esi + 0x78]
sub eax, ecx
cmp eax, ebp
jb 0x555a9c
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 0x555db3
mov eax, dword [esi + 0x7c]
cmp eax, ecx
jne 0x555db3
mov byte [esi + 0x65], 1
mov byte [esi + 0x66], cl
jmp 0x555900
mov eax, dword [esi + 0x78]
mov ecx, dword [esi + 0x7c]
mov edx, eax
or edx, ecx
je 0x555af9
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 0x555b39
jl 0x555b27
cmp ecx, ebp
jae 0x555b39
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 0x555c88
mov eax, dword [esi + 0x40]
mov edi, 0xb
sub edi, eax
mov dword [esp + 0x30], eax
cmp edi, ebp
jb 0x555b57
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.00621de0
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 0x555db1
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 0x555c11
sub eax, edi
mov byte [esi + 0x5c], 1
mov dword [esi + 0x58], eax
jmp 0x555c28
cmp eax, edi
ja 0x555c20
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 0x555c49
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 0x555d9a
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 0x555d9a
mov ebx, ecx
cmp byte [esi + 0x5e], 0
jne 0x555cf2
mov edi, dword [esi + 0x54]
sub edi, dword [esi + 0x50]
cmp edi, ebp
jb 0x555c9a
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 0x555d9a
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
add dword [ecx], eax
cmp edi, eax
jne 0x555d9a
add dword [esi + 0x50], edi
mov eax, dword [esi + 0x50]
add dword [esp + 0x10], edi
sub ebp, edi
cmp dword [esi + 0x54], eax
jne 0x555db3
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 0x555d06
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.00621de0
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 0x555db1
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 0x555d62
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 0x555d9a
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 0x555d9a
test ebp, ebp
jne 0x5558f1
jmp 0x555db3
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.0062023e
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.0062023e
add esp, 0x38
ret 0x28