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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push edi
mov edi, dword [ebp + 8]
cmp byte [edi + 0x49], 1
jne 0x5a7e31
mov cl, byte [edi + 0x48]
test cl, 2
je 0x5a7e31
mov eax, dword [edi + 0x78]
cmp byte [eax + 2], 0
je 0x5a7e31
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x14]
cmp dword [edi + 0x18], eax
jne 0x5a7e18
cmp dword [edi + 0x1c], edx
jne 0x5a7e18
mov eax, dword [ebp + 0x1c]
and dword [eax], 0
xor eax, eax
jmp 0x5a8136
test cl, 8
je 0x5a7e31
cmp dword [edi + 0x1c], edx
jg 0x5a7e31
jl 0x5a7e29
cmp dword [edi + 0x18], eax
jae 0x5a7e31
mov eax, dword [ebp + 0x1c]
or dword [eax], 0xffffffff
jmp 0x5a7e11
push ebx
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x5a7e49
push ebx
call fcn.005c6142
pop ecx
mov dword [ebp - 8], eax
mov byte [ebx + 7], 0
jmp 0x5a7e4d
and dword [ebp - 8], 0
push edi
call fcn.0059c4ab
pop ecx
test eax, eax
jne 0x5a8135
cmp byte [edi + 0x49], al
jne 0x5a7e6e
mov eax, dword [ebp + 0x1c]
or dword [eax], 0xffffffff
xor eax, eax
jmp 0x5a8135
xor edx, edx
inc edx
sub edx, dword [ebp + 0x18]
mov dword [ebp - 0x18], edx
push esi
movsx eax, word [edi + 0x4c]
xor ecx, ecx
mov dword [ebp - 4], ecx
mov esi, dword [edi + eax*4 + 0x78]
mov dword [ebp + 8], esi
movzx ecx, word [esi + 0x12]
dec ecx
mov ebx, ecx
mov dword [ebp - 0xc], ecx
mov ecx, edx
sar ebx, cl
cmp dword [ebp - 8], 0
mov word [edi + eax*2 + 0x4e], bx
jne 0x5a7f90
movzx eax, word [esi + 0x14]
mov ch, byte [esi + 3]
mov dword [ebp - 0x10], eax
movzx eax, byte [esi + 7]
mov byte [ebp + 0xb], ch
mov dword [ebp - 0x14], eax
mov edx, dword [esi + 0x40]
movzx ecx, byte [edx + ebx*2]
movzx eax, byte [edx + ebx*2 + 1]
shl ecx, 8
or ecx, eax
and ecx, dword [ebp - 0x10]
add ecx, dword [ebp - 0x14]
add ecx, dword [esi + 0x38]
cmp byte [ebp + 0xb], 0
je 0x5a7eea
jmp 0x5a7ee4
cmp ecx, dword [esi + 0x3c]
jae 0x5a80d3
cmp byte [ecx], 0x80
inc ecx
jae 0x5a7edb
lea eax, [ebp - 0x20]
push eax
push ecx
call fcn.005b3951
mov eax, dword [ebp - 0x20]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp + 0x14]
jg 0x5a7f42
jl 0x5a7f0a
mov edx, dword [ebp + 0x10]
cmp eax, edx
jae 0x5a7f45
mov eax, dword [ebp - 0xc]
lea edx, [ebx + 1]
mov dword [ebp - 4], edx
cmp edx, eax
jle 0x5a7f5d
or ecx, 0xffffffff
cmp byte [esi + 5], 0
jne 0x5a80ea
movzx eax, word [esi + 0x12]
cmp edx, eax
jl 0x5a808d
movzx ecx, byte [esi + 6]
mov eax, dword [esi + 0x38]
add ecx, 8
add eax, ecx
push eax
jmp 0x5a80a8
mov edx, dword [ebp + 0x10]
cmp ecx, dword [ebp + 0x14]
jl 0x5a7f6c
jg 0x5a7f50
cmp eax, edx
jbe 0x5a7f6c
mov edx, dword [ebp - 4]
lea eax, [ebx - 1]
mov dword [ebp - 0xc], eax
cmp edx, eax
jg 0x5a7f67
lea ebx, [eax + edx]
sar ebx, 1
jmp 0x5a7eb9
xor ecx, ecx
inc ecx
jmp 0x5a7f1a
or byte [edi + 0x48], 2
mov dword [edi + 0x18], eax
movsx eax, word [edi + 0x4c]
mov dword [edi + 0x1c], ecx
mov word [edi + eax*2 + 0x4e], bx
cmp byte [esi + 5], 0
jne 0x5a80e0
mov edx, ebx
mov dword [ebp - 4], edx
jmp 0x5a7f24
mov eax, dword [esi + 0x40]
movzx edx, byte [esi + 7]
mov dword [ebp - 0x14], edx
movzx ecx, byte [eax + ebx*2 + 1]
movzx eax, byte [eax + ebx*2]
shl eax, 8
or ecx, eax
movzx eax, word [esi + 0x14]
and ecx, eax
movzx eax, byte [esi + 8]
add ecx, edx
add ecx, dword [esi + 0x38]
movzx edx, byte [ecx]
cmp edx, eax
ja 0x5a7fc3
lea eax, [ecx + 1]
jmp 0x5a7fe0
mov al, byte [ecx + 1]
test al, al
js 0x5a7fef
and edx, 0x7f
movzx eax, al
shl edx, 7
add edx, eax
movzx eax, word [esi + 0xa]
cmp edx, eax
ja 0x5a7fef
lea eax, [ecx + 2]
push dword [ebp + 0xc]
push eax
push edx
call dword [ebp - 8]
add esp, 0xc
mov ecx, eax
jmp 0x5a805d
sub ecx, dword [ebp - 0x14]
lea esi, [edi + 0x18]
push esi
push ecx
push dword [ebp + 8]
call fcn.0058782c
mov esi, dword [esi]
mov eax, esi
cdq
push edx
push eax
mov dword [ebp - 0x14], esi
call fcn.005b5e1a
add esp, 0x14
mov dword [ebp - 0x10], eax
test eax, eax
je 0x5a8125
movsx ecx, word [edi + 0x4c]
push 2
push eax
push esi
push 0
push edi
mov word [edi + ecx*2 + 0x4e], bx
call fcn.0058409e
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x5a811a
push dword [ebp + 0xc]
mov esi, dword [ebp - 0x10]
push esi
push dword [ebp - 0x14]
call dword [ebp - 8]
push esi
mov dword [ebp - 0x14], eax
call fcn.005813ec
mov esi, dword [ebp + 8]
add esp, 0x10
mov ecx, dword [ebp - 0x14]
test ecx, ecx
jns 0x5a806c
mov eax, dword [ebp - 0xc]
lea edx, [ebx + 1]
mov dword [ebp - 4], edx
jmp 0x5a807b
jle 0x5a80fa
mov edx, dword [ebp - 4]
lea eax, [ebx - 1]
mov dword [ebp - 0xc], eax
cmp edx, eax
jg 0x5a7f1a
lea ebx, [eax + edx]
sar ebx, 1
jmp 0x5a7f90
mov eax, dword [esi + 0x40]
movzx ecx, byte [eax + edx*2 + 1]
movzx eax, byte [eax + edx*2]
shl eax, 8
or ecx, eax
movzx eax, word [esi + 0x14]
and ecx, eax
add ecx, dword [esi + 0x38]
push ecx
call fcn.005b3124
mov edx, eax
movsx eax, word [edi + 0x4c]
pop ecx
mov ecx, dword [ebp - 4]
push edx
push edi
mov word [edi + eax*2 + 0x4e], cx
call fcn.0059c360
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x5a8128
mov edx, dword [ebp - 0x18]
jmp 0x5a7e78
push 0xdf07
call fcn.005a992a
pop ecx
jmp 0x5a8134
mov eax, dword [ebp + 0x1c]
and dword [eax], 0
xor esi, esi
jmp 0x5a8128
movsx eax, word [edi + 0x4c]
mov word [edi + eax*2 + 0x4e], bx
mov eax, dword [ebp + 0x1c]
mov dword [eax], ecx
jmp 0x5a80e6
mov eax, dword [ebp + 0x1c]
xor esi, esi
push 0xb
pop ecx
and dword [eax], 0
movsx eax, word [edi + 0x4c]
mov word [edi + eax*2 + 0x4e], bx
mov eax, dword [ebp + 0xc]
cmp byte [eax + 7], 0
cmovne esi, ecx
jmp 0x5a8128
push dword [ebp - 0x10]
call fcn.005813ec
pop ecx
jmp 0x5a8128
push 7
pop esi
xor eax, eax
and byte [edi + 0x48], 0xf9
mov word [edi + 0x2c], ax
mov eax, esi
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret