Function at 0x5a5260
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, ecx
mov ebp, dword [esi + 0x44]
sub ebp, dword [esi + 0x30]
push edi
mov edi, dword [esi + 0x100]
xor ebx, ebx
cmp edi, ebx
je 0x5a54e4
cmp dword [esi + 0x104], ebx
je 0x5a54e4
cmp dword [esi + 0x108], ebx
je 0x5a54e4
cmp dword [esi + 0x10c], ebx
je 0x5a54e4
mov eax, dword [esi + 0x88]
sub eax, dword [esi + 0x40]
add eax, dword [esi + 0x24]
add eax, ebp
push eax
call sub.WS2_32.dll_htonl
mov dword [edi - 8], eax
mov eax, dword [esi + 0x28]
mov edi, dword [esi + 0x104]
add eax, ebp
push eax
sub edi, 8
call sub.WS2_32.dll_htonl
mov dword [edi], eax
mov eax, dword [esi + 0x2c]
mov edi, dword [esi + 0x108]
add eax, ebp
push eax
sub edi, 8
call sub.WS2_32.dll_htonl
mov dword [edi], eax
mov eax, dword [esi + 0x44]
mov edi, dword [esi + 0x10c]
push eax
sub edi, 8
call sub.WS2_32.dll_htonl
mov dword [edi], eax
cmp dword [esi + 0x90], ebx
jne 0x5a5343
mov eax, dword [esi + 0x14]
cmp eax, 0x40
je 0x5a5343
cmp eax, 0x80
je 0x5a5343
cmp eax, 0x800
je 0x5a5343
mov ecx, dword [esi + 8]
cmp ecx, 0x3e8
je 0x5a53b2
cmp ecx, ebx
je 0x5a53b2
mov eax, dword [esi + 0x7c]
mov edx, 0x3e8
mul edx
push ebx
push ecx
push edx
push eax
call fcn.00624150
inc eax
jmp 0x5a53af
cmp dword [esi + 0x78], ebx
jne 0x5a5351
mov eax, dword [esi + 0x80]
mov dword [esi + 0x78], eax
mov ecx, dword [esi + 0xc]
cmp ecx, 0x3e8
jne 0x5a5361
cmp dword [esi + 0x78], ebx
jne 0x5a537f
mov eax, dword [esi + 0x7c]
cmp eax, ebx
je 0x5a537f
cmp ecx, ebx
je 0x5a537f
mov edx, 0x3e8
mul edx
push ebx
push ecx
push edx
push eax
call fcn.00624150
mov dword [esi + 0x78], eax
mov eax, dword [esi + 0x14]
cmp eax, 0x40
je 0x5a538e
cmp eax, 0x80
jne 0x5a53b2
mov ecx, dword [esi + 0x10]
cmp ecx, ebx
je 0x5a53b2
mov eax, dword [esi + 0x84]
cmp eax, ebx
je 0x5a53b2
mov edx, 0x3e8
mul edx
push ebx
push ecx
push edx
push eax
call fcn.00624150
mov dword [esi + 0x78], eax
mov eax, dword [esi + 0x118]
cmp eax, ebx
je 0x5a53e3
mov ecx, dword [esi + 0x78]
push ecx
add eax, 0x14
push eax
mov ecx, esi
call fcn.005a3ef0
cmp dword [esi + 0x64], ebx
jne 0x5a53e3
mov edx, dword [esi + 0x118]
push 1
add edx, 0x20
push edx
mov ecx, esi
call fcn.005a3ef0
mov eax, dword [esi + 0x120]
cmp eax, ebx
je 0x5a5412
cmp byte [eax], bl
jne 0x5a5402
mov ecx, dword [esi + 0x7c]
push ecx
add eax, 0x10
push eax
mov ecx, esi
call fcn.005a3ef0
jmp 0x5a5412
mov edx, dword [esi + 0x7c]
push ebx
push edx
add eax, 0x18
push eax
mov ecx, esi
call fcn.005a3f10
mov eax, dword [esi + 0x118]
cmp eax, ebx
je 0x5a543c
push 0xf
push eax
mov ecx, esi
call fcn.005a3ef0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esi + 0x118]
add ecx, 0xc
push eax
push ecx
mov ecx, esi
call fcn.005a3ef0
mov eax, dword [esi + 0x124]
cmp eax, ebx
je 0x5a54ec
cmp dword [esi + 0x104], eax
jbe 0x5a54ec
mov ecx, dword [esi + 0x100]
mov edi, dword [esp + 0x18]
sub eax, ecx
push ebx
add eax, 8
lea edx, [esp + 0x14]
push edx
mov ebp, eax
push ebp
add ecx, 0xfffffff8
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5a54d8
mov eax, dword [esp + 0x10]
cmp ebp, eax
jne 0x5a54d8
mov ebp, dword [esp + 0x20]
add dword [ebp], eax
push edi
mov ecx, esi
adc dword [ebp + 4], ebx
call fcn.005a4f00
mov eax, dword [esi + 0x88]
add dword [ebp], eax
push 0
lea edx, [esp + 0x14]
adc dword [ebp + 4], ebx
mov ecx, dword [esi + 0x40]
mov ebx, dword [esi + 0x10c]
mov eax, dword [esi + 0x124]
sub ebx, ecx
push edx
sub ebx, eax
push ebx
add ecx, eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5a54d8
mov eax, dword [esp + 0x10]
cmp ebx, eax
je 0x5a5572
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xa4], eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 0xc
mov eax, dword [esi + 0x100]
mov ebp, dword [esi + 0x104]
mov edi, dword [esp + 0x18]
push ebx
lea ecx, [esp + 0x14]
push ecx
sub ebp, eax
push ebp
add eax, 0xfffffff8
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5a54d8
mov eax, dword [esp + 0x10]
cmp ebp, eax
jne 0x5a54d8
mov ebp, dword [esp + 0x20]
add dword [ebp], eax
push edi
mov ecx, esi
adc dword [ebp + 4], ebx
call fcn.005a4f00
mov edx, dword [esi + 0x88]
add dword [ebp], edx
push 0
lea ecx, [esp + 0x14]
adc dword [ebp + 4], ebx
mov eax, dword [esi + 0x104]
mov ebx, dword [esi + 0x10c]
sub ebx, eax
push ecx
add ebx, 8
push ebx
add eax, 0xfffffff8
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5a54d8
mov eax, dword [esp + 0x10]
cmp ebx, eax
jne 0x5a54d8
add dword [ebp], eax
push 0
lea edx, [esp + 0x14]
adc dword [ebp + 4], 0
mov ebx, dword [esi + 0x34]
mov eax, dword [esi + 0x110]
push edx
push ebx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5a54d8
mov eax, dword [esp + 0x10]
cmp ebx, eax
jne 0x5a54d8
add dword [ebp], eax
adc dword [ebp + 4], 0
mov eax, dword [esi + 0x58]
add eax, dword [esi + 0x8c]
add eax, dword [esi + 0x54]
add eax, dword [esi + 0x50]
add eax, dword [esi + 0x4c]
add eax, dword [esi + 0x48]
push eax
mov dword [esp + 0x24], eax
call fcn.005f4427
mov ebx, eax
add esp, 4
mov dword [esp + 0x1c], ebx
test ebx, ebx
je 0x5a54d8
mov ecx, dword [esi + 0x4c]
push ecx
push ebx
mov ecx, esi
call fcn.005a3ef0
mov edi, eax
add edi, ebx
mov dword [edi], 0x73747473
push 0
add edi, 4
push edi
mov ecx, esi
call fcn.005a3ef0
mov edx, dword [esi + 0xe0]
add edi, eax
push edx
push edi
mov ecx, esi
call fcn.005a3ef0
mov ebx, dword [esi + 0xc8]
add edi, eax
test ebx, ebx
je 0x5a5642
lea ecx, [ecx]
mov eax, dword [ebx]
push eax
push edi
mov ecx, esi
call fcn.005a3ef0
mov ecx, dword [ebx + 4]
push ecx
add edi, eax
push edi
mov ecx, esi
call fcn.005a3ef0
mov ebx, dword [ebx + 8]
add edi, eax
test ebx, ebx
jne 0x5a5620
cmp dword [esi + 0x64], 0
je 0x5a569b
mov edx, dword [esi + 0x48]
push edx
push edi
mov ecx, esi
call fcn.005a3ef0
add edi, eax
mov dword [edi], 0x73737473
push 0
add edi, 4
push edi
mov ecx, esi
call fcn.005a3ef0
add edi, eax
mov eax, dword [esi + 0xe8]
push eax
push edi
mov ecx, esi
call fcn.005a3ef0
mov ebx, dword [esi + 0xd8]
add edi, eax
test ebx, ebx
je 0x5a569b
mov ecx, dword [ebx + 8]
push ecx
push edi
mov ecx, esi
call fcn.005a3ef0
mov ebx, dword [ebx + 0xc]
add edi, eax
test ebx, ebx
jne 0x5a5686
mov eax, dword [esi + 0x8c]
test eax, eax
je 0x5a5702
push eax
push edi
mov ecx, esi
call fcn.005a3ef0
add edi, eax
mov dword [edi], 0x73747463
push 0
add edi, 4
push edi
mov ecx, esi
call fcn.005a3ef0
mov edx, dword [esi + 0xc4]
add edi, eax
push edx
push edi
mov ecx, esi
call fcn.005a3ef0
mov ebx, dword [esi + 0x9c]
add edi, eax
test ebx, ebx
je 0x5a5702
mov eax, dword [ebx]
push eax
push edi
mov ecx, esi
call fcn.005a3ef0
mov ecx, dword [ebx + 4]
push ecx
add edi, eax
push edi
mov ecx, esi
call fcn.005a3ef0
mov ebx, dword [ebx + 8]
add edi, eax
test ebx, ebx
jne 0x5a56e0
mov edx, dword [esi + 0x50]
push edx
push edi
mov ecx, esi
call fcn.005a3ef0
add edi, eax
mov dword [edi], 0x63737473
push 0
add edi, 4
push edi
mov ecx, esi
call fcn.005a3ef0
add edi, eax
mov eax, dword [esi + 0xe4]
push eax
push edi
mov ecx, esi
call fcn.005a3ef0
mov ebx, dword [esi + 0xd0]
add edi, eax
test ebx, ebx
je 0x5a5770
mov ecx, dword [ebx]
push ecx
push edi
mov ecx, esi
call fcn.005a3ef0
mov edx, dword [ebx + 4]
add edi, eax
push edx
push edi
mov ecx, esi
call fcn.005a3ef0
add edi, eax
mov eax, dword [ebx + 8]
push eax
push edi
mov ecx, esi
call fcn.005a3ef0
mov ebx, dword [ebx + 0xc]
add edi, eax
test ebx, ebx
jne 0x5a5740
mov ecx, dword [esi + 0x54]
push ecx
push edi
mov ecx, esi
call fcn.005a3ef0
add edi, eax
mov dword [edi], 0x7a737473
push 0
add edi, 4
push edi
mov ecx, esi
call fcn.005a3ef0
add edi, eax
push 0
push edi
mov ecx, esi
call fcn.005a3ef0
mov edx, dword [esi + 0x5c]
add edi, eax
push edx
push edi
mov ecx, esi
call fcn.005a3ef0
xor ebx, ebx
add edi, eax
cmp dword [esi + 0x5c], ebx
jbe 0x5a57cb
mov eax, dword [esi + 0x60]
mov ecx, dword [eax + ebx*4]
push ecx
push edi
mov ecx, esi
call fcn.005a3ef0
inc ebx
add edi, eax
cmp ebx, dword [esi + 0x5c]
jb 0x5a57b4
mov edx, dword [esi + 0x58]
push edx
push edi
mov ecx, esi
call fcn.005a3ef0
add edi, eax
cmp dword [esi + 0xec], 0
mov eax, str.co64
jne 0x5a57ec
mov eax, str.stco
mov eax, dword [eax]
mov dword [edi], eax
push 0
add edi, 4
push edi
mov ecx, esi
call fcn.005a3ef0
mov ecx, dword [esi + 0xe8]
push ecx
add edi, eax
push edi
mov ecx, esi
call fcn.005a3ef0
mov ebx, dword [esi + 0xd8]
add edi, eax
test ebx, ebx
je 0x5a5857
lea ebx, [ebx]
cmp dword [esi + 0xec], 0
mov eax, dword [ebx]
je 0x5a5845
mov edx, dword [ebx + 4]
mov cl, 0x20
call fcn.006282b0
push eax
push edi
mov ecx, esi
call fcn.005a3ef0
mov edx, dword [ebx]
add edi, eax
push edx
jmp 0x5a5846
push eax
push edi
mov ecx, esi
call fcn.005a3ef0
mov ebx, dword [ebx + 0xc]
add edi, eax
test ebx, ebx
jne 0x5a5820
mov ebx, dword [esp + 0x20]
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x14]
push ecx
push ebx
push edi
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5a54d8
mov eax, dword [esp + 0x10]
cmp ebx, eax
jne 0x5a54d8
add dword [ebp], eax
push edi
adc dword [ebp + 4], 0
call fcn.005f4432
mov edi, dword [esi + 0x10c]
mov ebx, dword [esi + 0x30]
mov eax, dword [esi + 0x100]
mov ecx, dword [esi + 0x24]
lea edx, [edi + ebx]
add eax, ecx
add esp, 4
cmp eax, edx
jbe 0x5a54e4
mov eax, dword [esi + 0x124]
test eax, eax
je 0x5a596e
cmp edx, eax
jae 0x5a596e
lea ecx, [edx - 8]
cmp ecx, eax
jae 0x5a590e
mov ecx, dword [esp + 0x18]
sub eax, edi
sub eax, ebx
add eax, 8
push 0
mov edi, eax
lea eax, [esp + 0x14]
push eax
push edi
add edx, 0xfffffff8
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5a54d8
mov eax, dword [esp + 0x10]
cmp edi, eax
jne 0x5a54d8
add dword [ebp], eax
adc dword [ebp + 4], 0
mov ecx, dword [esi + 0x100]
mov eax, dword [esi + 0x24]
mov edx, dword [esi + 0x124]
mov edi, dword [esi + 0x40]
add edi, edx
lea ebx, [eax + ecx - 8]
cmp ebx, edi
jbe 0x5a54e4
sub eax, dword [esi + 0x40]
push 0
sub eax, edx
lea edx, [esp + 0x14]
push edx
lea ebx, [eax + ecx - 8]
mov eax, dword [esp + 0x20]
push ebx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5a54d8
mov eax, dword [esp + 0x10]
cmp ebx, eax
jne 0x5a54d8
add dword [ebp], eax
pop edi
pop esi
adc dword [ebp + 4], 0
pop ebp
pop ebx
pop ecx
ret 0xc
sub ecx, edi
sub ecx, ebx
add ecx, dword [esi + 0x100]
mov edi, ecx
lea ecx, [edx - 8]
add edx, 0xfffffff8
cmp edx, eax
jne 0x5a598b
mov eax, dword [esi + 0x40]
sub edi, eax
add ecx, eax
test edi, edi
jbe 0x5a54e4
mov eax, dword [esp + 0x18]
push 0
lea edx, [esp + 0x14]
push edx
push edi
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5a54d8
mov eax, dword [esp + 0x10]
cmp edi, eax
jne 0x5a54d8
add dword [ebp], eax
pop edi
pop esi
adc dword [ebp + 4], 0
pop ebp
pop ebx
pop ecx
ret 0xc