Function at 0x594eec
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x280
cmp byte [ecx + 0xf0], 0
mov edi, ecx
call 0x594f04
pop eax
mov dword [esp + 0x10], edx
mov dword [esp], ecx
mov dword [esp + 0x70], eax
je 0x594f25
cmp dword [edi + 0xe4], 0
je 0x594f25
mov byte [esp + 4], 4
jmp 0x595614
lea ecx, [edi + 0xb8]
mov dword [esp + 0x18], ecx
call fcn.005961ba
test eax, eax
je 0x595423
cmp byte [edi + 0xdc], 0
je 0x595443
lea eax, [edi + 0xc8]
mov dword [esp + 0x64], eax
mov eax, 0x200
lea ecx, [esp + 0x80]
test eax, eax
je 0x594f75
and dword [ecx], 0
mov dword [ecx + 4], str.dest_is_out_of_bounds
add ecx, 8
add eax, 0xfffffff8
jmp 0x594f5f
mov eax, dword [edi + 0xc0]
xor esi, esi
cmp eax, dword [edi + 0xc4]
mov eax, 0
je 0x594fa4
mov ecx, dword [esp + 0x18]
call fcn.005963e6
mov dword [esp + 0x80], edx
mov dword [esp + 0x84], eax
xor eax, eax
inc eax
lea ecx, [esp + 0x80]
push 0x40
pop edx
push 0xa03a08
mov dword [esp + 0x6c], eax
push eax
call fcn.005961cd
pop ecx
pop ecx
test edx, edx
mov dword [esp + 0x74], eax
je 0x595170
mov ebp, edx
mov edx, dword [esp + 0x64]
lea ecx, [esp + 0x50]
call fcn.005961ed
mov eax, dword [esp + 0x50]
mov edx, dword [esp + 0x54]
mov edi, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
xor esi, esi
mov dword [esp + 0xc], ebp
cmp eax, edx
je 0x594ffe
mov dword [esp + 0x14], edi
mov ebx, ecx
mov edi, eax
jmp 0x59500e
cmp edi, ecx
mov ebx, edx
mov dword [esp + 0x14], edx
mov edx, ecx
je 0x59516d
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x3c], edx
mov dword [esp + 0x78], ebx
mov edx, ebp
push 0xa03898
push esi
call fcn.005961cd
pop ecx
pop ecx
mov ebx, eax
mov eax, dword [edi]
mov ebp, edx
mov eax, dword [eax*4 + 0x595a74]
add eax, dword [esp + 0x70]
jmp eax
mov edi, dword [esp]
add esi, dword [esp + 0x68]
lea ecx, [esp + 0x80]
mov edx, esi
push 0xa00dd8
call fcn.00596236
pop ecx
mov ecx, dword [edi + 0xb0]
push edx
push eax
push dword [esp + 0x18]
push dword [edi + 0xac]
lea eax, [esp + 0x60]
push eax
call dword [ecx + 0x1c]
add esp, 0x14
cmp byte [esp + 0x50], 5
je 0x5955ea
mov eax, dword [esp + 0x50]
mov ebp, dword [esp + 0x54]
cmp al, 4
jne 0x5955f1
mov eax, dword [edi + 0xc0]
mov ecx, dword [edi + 0xc4]
xor edx, edx
mov esi, 0xff
mov dword [esp + 0x1c], ebp
sub eax, ecx
cmp eax, ebp
setne dl
cmovb edx, esi
test dl, dl
je 0x5951fa
movzx edx, dl
cmp edx, 1
jne 0x59520d
add ecx, ebp
mov dword [edi + 0xc4], ecx
jmp 0x5952e6
and dword [edi + 0xc4], 0
and dword [edi + 0xc0], 0
jmp 0x5952e6
and dword [edi + 0xc4], 0
and dword [edi + 0xc0], 0
sub ebp, eax
xor edx, edx
mov ebx, dword [edi + 0xcc]
mov esi, dword [edi + 0xc8]
mov dword [esp + 0x3c], ebx
test ebp, ebp
je 0x5952e6
mov eax, dword [edi + 0xd4]
test eax, eax
mov dword [esp + 0x14], eax
je 0x595a5e
mov eax, dword [edi + 0xd0]
mov ecx, ebx
cmp eax, ebx
cmovb ecx, edx
sub eax, ecx
imul edi, eax, 0x28
add edi, esi
mov ecx, edi
call fcn.0057a9f8
mov edx, ebp
mov ecx, edi
sub ebp, eax
jb 0x5952de
mov edx, eax
call fcn.00596254
mov edx, dword [esp]
mov edi, 0
mov eax, dword [edx + 0xd0]
lea ecx, [eax + 1]
cmp ecx, ebx
cmovb ebx, edi
neg ebx
lea ecx, [eax + ebx + 1]
mov ebx, esi
imul esi, eax, 0x28
mov dword [edx + 0xd0], ecx
mov ecx, dword [esp + 0x14]
add esi, ebx
dec ecx
mov dword [edx + 0xd4], ecx
push 0xa
pop ecx
lea edi, [esp + 0x80]
mov edx, 0
rep movsd dword es:[edi], dword [esi]
mov esi, ebx
cmp dword [esp + 0x80], 4
je 0x5952d2
lea ecx, [esp + 0x80]
call fcn.0058ac04
xor edx, edx
mov edi, dword [esp]
mov ebx, dword [esp + 0x3c]
jmp 0x59522f
call fcn.00596254
mov edi, dword [esp]
mov eax, dword [0xa70a24]
cmp eax, 1
ja 0x5953ec
mov ecx, 0xa70300
call fcn.0040e00b
test al, al
je 0x5953ec
mov ecx, dword [0xa70300]
movzx edx, al
call fcn.00605cf4
test al, al
je 0x5953ec
mov ecx, dword [0xa70300]
mov edx, dword [ecx + 0x20]
lea esi, [ecx + 0x1c]
test edx, edx
je 0x595357
mov edi, dword [ecx + 0x24]
mov eax, dword [ecx + 0x1c]
mov ecx, dword [ecx + 0x28]
mov dword [esp + 0x84], edx
mov dword [esp + 0x88], edi
mov edi, dword [esp]
mov dword [esp + 0x8c], ecx
and dword [esp + 0x90], 0
jmp 0x595359
xor eax, eax
lea ebx, [esp + 0x50]
lea ebp, [esp + 0x80]
mov dword [esp + 0x80], eax
mov ecx, ebx
mov edx, ebp
push 0xa00de8
call fcn.0057917a
pop eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x80], 0xa00e08
mov dword [esp + 0x84], 2
and dword [esp + 0x90], 0
xor ecx, ecx
lea edx, [esp + 0x2c]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], 0x9fd8ec
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
inc ecx
mov dword [esp + 0x40], edx
lea edx, [esp + 0x40]
mov dword [esp + 0x24], fcn.0043ddb0
mov dword [esp + 0x88], eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x8c], ecx
mov ecx, dword [0xa70300]
mov dword [esp + 0x48], esi
call fcn.00606f01
mov ecx, dword [esp + 0x18]
call fcn.005961ba
test eax, eax
je 0x595423
cmp dword [esp + 0x1c], 0
jne 0x594f53
mov eax, dword [0xa70a24]
test eax, eax
je 0x5957e9
and dword [esp + 8], 0
mov dword [esp + 4], 0x1701
jmp 0x59560d
mov eax, dword [edi + 0xb0]
lea ecx, [esp + 4]
push dword [esp + 0x10]
push dword [edi + 0xac]
push ecx
call dword [eax + 0x14]
add esp, 0xc
jmp 0x59560d
mov ebx, dword [edi + 0xac]
mov ebp, dword [edi + 0xb0]
lea edi, [esp + 0x50]
mov ecx, dword [esp + 0x18]
call fcn.005963e6
push edx
push eax
push dword [esp + 0x18]
push ebx
lea eax, [esp + 0x90]
push eax
call dword [ebp + 0x10]
add esp, 0x14
cmp byte [esp + 0x80], 5
je 0x5955fb
mov ecx, dword [esp + 0x80]
mov eax, dword [esp + 0x84]
cmp cl, 4
jne 0x595602
mov dword [esp + 0x1c], eax
mov eax, dword [0xa70a24]
cmp eax, 1
ja 0x5955a5
mov ecx, 0xa70324
call fcn.0040e00b
test al, al
je 0x5955a5
mov ecx, dword [0xa70324]
movzx edx, al
call fcn.00605cf4
test al, al
je 0x5955a5
mov ecx, dword [0xa70324]
mov edx, dword [ecx + 0x20]
lea eax, [ecx + 0x1c]
mov dword [esp + 0x14], eax
test edx, edx
je 0x595510
mov eax, dword [ecx + 0x1c]
mov esi, dword [ecx + 0x24]
mov ecx, dword [ecx + 0x28]
mov dword [esp + 0x84], edx
lea edi, [esp + 0x50]
mov dword [esp + 0x88], esi
mov dword [esp + 0x8c], ecx
and dword [esp + 0x90], 0
jmp 0x595512
xor eax, eax
lea esi, [esp + 0x80]
mov dword [esp + 0x80], eax
mov ecx, edi
mov edx, esi
push 0xa00edc
call fcn.0057917a
pop eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x80], 0xa00e08
mov dword [esp + 0x84], 2
and dword [esp + 0x90], 0
xor ecx, ecx
lea edx, [esp + 0x2c]
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], 0x9fd8ec
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
inc ecx
mov dword [esp + 0x40], edx
lea edx, [esp + 0x40]
mov dword [esp + 0x24], fcn.0043ddb0
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x48], ecx
mov ecx, dword [0xa70324]
call fcn.00606f01
mov edx, dword [esp]
mov eax, dword [esp + 0x1c]
mov ecx, dword [edx + 0xc4]
add ecx, eax
mov dword [edx + 0xc4], ecx
cmp dword [edx + 0xc0], ecx
je 0x5957c6
test eax, eax
jne 0x595453
mov eax, dword [0xa70a24]
test eax, eax
je 0x5958e8
and dword [esp + 8], 0
mov dword [esp + 4], 0x1701
jmp 0x59560a
mov byte [esp + 4], 5
jmp 0x59560d
mov dword [esp + 4], eax
mov dword [esp + 8], ebp
jmp 0x59560d
mov byte [esp + 4], 5
jmp 0x59560a
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov edi, dword [esp]
cmp byte [esp + 4], 5
je 0x595629
mov ebx, dword [esp + 4]
cmp bl, 4
je 0x595631
movzx eax, bl
cmp eax, 5
jne 0x59573e
xor esi, esi
inc esi
jmp 0x5958d9
mov edx, dword [esp + 0x10]
mov ecx, edi
call fcn.00595a84
mov eax, dword [0xa70a24]
xor edi, edi
mov esi, 0
test eax, eax
jne 0x5958d9
mov ecx, 0xa7036c
call fcn.0040e00b
test al, al
je 0x5957bf
mov ecx, dword [0xa7036c]
movzx edx, al
call fcn.00605cf4
xor edi, edi
test al, al
mov esi, 0
je 0x5958d9
mov ecx, dword [0xa7036c]
xor esi, esi
mov eax, 0
mov edx, dword [ecx + 0x20]
lea ebp, [ecx + 0x1c]
test edx, edx
je 0x5956bc
mov eax, dword [ecx + 0x1c]
mov edi, dword [ecx + 0x24]
mov ecx, dword [ecx + 0x28]
mov dword [esp + 0x84], edx
mov dword [esp + 0x88], edi
mov dword [esp + 0x8c], ecx
and dword [esp + 0x90], 0
lea edi, [esp + 0x80]
lea ebx, [esp + 0x50]
mov dword [edi], eax
mov ecx, ebx
mov edx, edi
push 0xa01040
call fcn.0057917a
pop eax
mov ecx, dword [esp]
lea eax, [esp + 0x2c]
mov dword [edi], str.flushed__:
mov dword [eax], str.roleclient
mov dword [eax + 4], fcn.0042d43d
mov dword [eax + 8], ecx
mov dword [eax + 0xc], 0x4e851e
push 2
pop ecx
mov dword [edi + 4], ecx
and dword [edi + 0x10], 0
mov dword [edi + 8], eax
mov dword [edi + 0xc], ecx
mov ecx, dword [0xa7036c]
lea eax, [esp + 0x40]
lea edx, [esp + 0x20]
mov dword [eax], ebx
mov dword [eax + 4], edi
mov dword [edx], eax
mov dword [edx + 4], 1
mov dword [eax + 8], 0x9fd8ec
mov dword [edx + 8], ebp
call fcn.00606f01
xor edi, edi
jmp 0x5958d9
mov esi, dword [esp + 8]
mov dword [esp + 4], ebx
mov dword [esp + 8], esi
mov eax, dword [0xa70a24]
cmp eax, 1
ja 0x5958c2
mov ecx, 0xa70534
call fcn.0040e00b
test al, al
je 0x5958c2
mov ecx, dword [0xa70534]
movzx edx, al
call fcn.00605cf4
test al, al
je 0x5958c2
mov ecx, dword [0xa70534]
mov edx, dword [ecx + 0x20]
lea ebx, [ecx + 0x1c]
test edx, edx
je 0x595850
mov eax, dword [ecx + 0x1c]
mov esi, dword [ecx + 0x24]
mov ecx, dword [ecx + 0x28]
mov dword [esp + 0x84], edx
mov dword [esp + 0x88], esi
mov dword [esp + 0x8c], ecx
and dword [esp + 0x90], 0
jmp 0x595852
xor edi, edi
jmp 0x5958d7
mov edi, dword [esp]
lea eax, [esp + 4]
and dword [edi + 0xc4], 0
and dword [edi + 0xc0], 0
push dword [esp + 0x10]
push ebx
push eax
call dword [ebp + 0x14]
jmp 0x59543b
mov ecx, 0xa7030c
call fcn.0040e00b
test al, al
je 0x595411
mov ecx, dword [0xa7030c]
movzx edx, al
call fcn.00605cf4
test al, al
je 0x595411
mov ecx, dword [0xa7030c]
mov edx, dword [ecx + 0x20]
lea edi, [ecx + 0x1c]
test edx, edx
je 0x595951
mov eax, dword [ecx + 0x1c]
mov esi, dword [ecx + 0x24]
mov ecx, dword [ecx + 0x28]
mov dword [esp + 0x84], edx
mov dword [esp + 0x88], esi
mov dword [esp + 0x8c], ecx
and dword [esp + 0x90], 0
jmp 0x595953
xor eax, eax
lea esi, [esp + 0x80]
lea edi, [esp + 0x50]
mov dword [esi], eax
mov ecx, edi
mov edx, esi
push 0xa01a14
call fcn.0057917a
pop eax
xor ecx, ecx
lea ebp, [esp + 4]
lea eax, [esp + 0x20]
mov dword [esi], str.error_writing:
lea edx, [esp + 0x40]
inc ecx
mov dword [eax], ebp
mov dword [eax + 4], fcn.005e2620
mov dword [esi + 4], ecx
and dword [esi + 0x10], 0
mov dword [esi + 8], eax
lea eax, [esp + 0x2c]
mov dword [esi + 0xc], ecx
mov dword [edx], eax
mov dword [edx + 4], ecx
mov ecx, dword [0xa70534]
mov dword [eax], edi
mov dword [eax + 4], esi
mov dword [eax + 8], 0x9fd8ec
mov dword [edx + 8], ebx
call fcn.00606f01
mov ebx, dword [ebp]
mov esi, dword [ebp + 4]
push 9
pop ecx
call fcn.004e415f
mov edi, eax
mov ecx, eax
mov edx, ebx
push esi
call fcn.004e763e
pop ecx
xor esi, esi
mov eax, esi
mov edx, edi
add esp, 0x280
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, 0xa70330
call fcn.0040e00b
test al, al
je 0x5955db
mov ecx, dword [0xa70330]
movzx edx, al
call fcn.00605cf4
test al, al
je 0x5955db
mov ecx, dword [0xa70330]
mov ebp, edi
mov edx, dword [ecx + 0x20]
lea ebx, [ecx + 0x1c]
test edx, edx
je 0x5959db
mov eax, dword [ecx + 0x1c]
mov esi, dword [ecx + 0x24]
mov ecx, dword [ecx + 0x28]
mov dword [esp + 0x84], edx
mov dword [esp + 0x88], esi
mov dword [esp + 0x8c], ecx
and dword [esp + 0x90], 0
jmp 0x5959dd
xor eax, eax
lea esi, [esp + 0x80]
lea ebx, [esp + 0x50]
mov dword [esi], eax
mov ecx, ebx
mov edx, esi
push 0xa00e18
call fcn.0057917a
pop eax
mov ecx, dword [esp + 0x18]
call fcn.005961ba
lea ecx, [esp + 0x7c]
lea edx, [esp + 0x40]
mov dword [esi], str.write_returned_zero__but__bytes_remaining
mov dword [esi + 4], 2
and dword [esi + 0x10], 0
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], 0x9fd8ec
mov dword [ecx], eax
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x2c]
lea eax, [esp + 0x20]
mov dword [esp + 0x24], fcn.0043ddb0
mov dword [edx], ecx
mov ecx, dword [0xa7030c]
mov dword [esi + 8], eax
xor eax, eax
inc eax
mov dword [edx + 4], eax
mov dword [esi + 0xc], eax
mov dword [edx + 8], edi
call fcn.00606f01
mov edi, dword [esp]
jmp 0x595411
xor eax, eax
lea edi, [esp + 0x80]
mov ecx, ebp
mov dword [edi], eax
mov edx, edi
push 0xa00eec
call fcn.0057917a
pop eax
mov ecx, dword [esp + 0x18]
call fcn.005961ba
lea ecx, [esp + 0x7c]
mov dword [edi], str.write_returned_zero__but__bytes_remaining
mov dword [edi + 4], 2
and dword [edi + 0x10], 0
lea edx, [esp + 0x40]
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], 0x9fd8ec
mov dword [ecx], eax
mov dword [esp + 0x20], ecx
xor ecx, ecx
lea eax, [esp + 0x20]
mov dword [esp + 0x24], fcn.0043ddb0
mov dword [edi + 8], eax
inc ecx
lea eax, [esp + 0x2c]
mov dword [edx], eax
mov dword [edx + 4], ecx
mov dword [edi + 0xc], ecx
mov ecx, dword [0xa70330]
mov dword [edx + 8], ebx
call fcn.00606f01
jmp 0x5955db
push 0x14
pop edx
mov ecx, 0x9fdd2d
push 0xa038a8
call fcn.0063d070
pop eax
ud2