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

Disassembly:
sub esp, 0x38
mov eax, dword [0x755898]
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 0x554713
cmp byte [esi + 0x65], 0
je 0x554461
jmp 0x554260
cmp byte [esi + 0x65], 1
jne 0x55430f
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 0x554283
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.0061eea0
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 0x554713
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 0x5542df
test ecx, ecx
jne 0x5542df
mov byte [esi + 0x64], 0xc
jmp 0x554303
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 0x554303
jl 0x5542fd
cmp eax, edx
jae 0x554303
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 0x5543e4
movsx eax, byte [esi + 0x67]
movsx ebx, byte [esi + 0x64]
sub ebx, eax
cmp ebx, ebp
jb 0x554329
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.0061eea0
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 0x554713
mov ecx, dword [esi + 0x6c]
mov dword [esp + 0x3c], ecx
mov byte [esp + 0x40], 0
cmp al, 0xc
jne 0x5543a3
lea edx, [esi + 0x70]
push edx
call fcn.00553810
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 0x5543a5
jl 0x55439b
cmp eax, edi
jae 0x5543a5
mov dword [esi + 0x78], edi
mov dword [esi + 0x7c], edi
jmp 0x5543a5
xor edi, edi
mov ecx, str.mdat
lea eax, [esp + 0x3c]
mov edi, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x5543d0
test dl, dl
je 0x5543cc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x5543d0
add eax, 2
add ecx, 2
test dl, dl
jne 0x5543b0
xor eax, eax
jmp 0x5543d5
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, edi
je 0x554436
mov ebx, dword [esp + 0x14]
mov byte [esi + 0x65], 3
mov dword [esi + 0x60], edi
cmp byte [esi + 0x65], 3
jne 0x554260
mov ecx, dword [esi + 0x60]
mov eax, dword [esi + 0x78]
sub eax, ecx
cmp eax, ebp
jb 0x5543fc
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 0x554713
mov eax, dword [esi + 0x7c]
cmp eax, ecx
jne 0x554713
mov byte [esi + 0x65], 1
mov byte [esi + 0x66], cl
jmp 0x554260
mov eax, dword [esi + 0x78]
mov ecx, dword [esi + 0x7c]
mov edx, eax
or edx, ecx
je 0x554459
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 0x554499
jl 0x554487
cmp ecx, ebp
jae 0x554499
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 0x5545e8
mov eax, dword [esi + 0x40]
mov edi, 0xb
sub edi, eax
mov dword [esp + 0x30], eax
cmp edi, ebp
jb 0x5544b7
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 + 0x1c]
push edx
call fcn.0061eea0
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 0x554711
movzx ecx, byte [esi + 0x1f]
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 + 0x1d]
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 + 0x22]
mov dword [esi + 0x54], eax
xor eax, eax
mov word [esp + 0x25], ax
mov byte [esp + 0x27], al
movzx eax, word [esi + 0x20]
lea ebx, [esi + 0x20]
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 + 0x23]
shl eax, 0x18
or edi, eax
mov eax, dword [esi + 0x4c]
add ecx, edi
cmp ecx, eax
jae 0x554571
sub eax, edi
mov byte [esi + 0x5c], 1
mov dword [esi + 0x58], eax
jmp 0x554588
cmp eax, edi
ja 0x554580
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 0x5545a9
mov eax, dword [esi + 0x58]
add eax, edi
push eax
push ebx
call fcn.00553850
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 + 0x1c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5546fa
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 0x5546fa
mov ebx, ecx
cmp byte [esi + 0x5e], 0
jne 0x554652
mov edi, dword [esi + 0x54]
sub edi, dword [esi + 0x50]
cmp edi, ebp
jb 0x5545fa
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 0x5546fa
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
add dword [ecx], eax
cmp edi, eax
jne 0x5546fa
add dword [esi + 0x50], edi
mov eax, dword [esi + 0x50]
add dword [esp + 0x10], edi
sub ebp, edi
cmp dword [esi + 0x54], eax
jne 0x554713
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 0x554666
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 + 0x27]
push ecx
call fcn.0061eea0
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 0x554711
mov eax, dword [esi + 0x27]
lea edi, [esi + 0x27]
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 0x5546c2
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 0x5546fa
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 0x5546fa
test ebp, ebp
jne 0x554251
jmp 0x554713
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.0061d2ff
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.0061d2ff
add esp, 0x38
ret 0x28