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

Disassembly:
mov eax, dword [esi + 0x6c]
cmp eax, 0x106
jae 0x4a56e1
push esi
call fcn.004a5050
mov eax, dword [esi + 0x6c]
mov ebx, dword [esp + 0x20]
add esp, 4
cmp eax, 0x106
jae 0x4a56d9
test ebx, ebx
je 0x4a5ac2
test eax, eax
je 0x4a59fa
cmp eax, 3
jb 0x4a5727
mov eax, dword [esi + 0x40]
mov ecx, dword [esi + 0x50]
mov edx, dword [esi + 0x64]
mov edi, dword [esi + 0x4c]
shl eax, cl
mov ecx, dword [esi + 0x30]
xor ebx, ebx
mov bl, byte [ecx + edx + 2]
mov ecx, dword [esi + 0x3c]
xor eax, ebx
and eax, edi
xor edi, edi
mov dword [esi + 0x40], eax
mov di, word [ecx + eax*2]
mov eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x38]
and eax, edx
mov word [ecx + eax*2], di
mov edx, dword [esi + 0x40]
mov eax, dword [esi + 0x3c]
mov cx, word [esi + 0x64]
mov word [eax + edx*2], cx
mov edx, dword [esi + 0x58]
mov eax, dword [esi + 0x68]
test edi, edi
mov dword [esi + 0x70], edx
mov dword [esi + 0x5c], eax
mov dword [esi + 0x58], ebp
je 0x4a5792
mov eax, dword [esi + 0x78]
mov ecx, edx
cmp ecx, eax
jae 0x4a5792
mov edx, dword [esi + 0x64]
mov eax, dword [esi + 0x24]
sub edx, edi
sub eax, 0x106
cmp edx, eax
ja 0x4a5792
cmp dword [esi + 0x80], ebp
je 0x4a5769
push edi
push esi
call fcn.004a5530
add esp, 8
mov dword [esi + 0x58], eax
mov eax, dword [esi + 0x58]
cmp eax, 5
ja 0x4a5792
cmp dword [esi + 0x80], 1
je 0x4a578f
cmp eax, 3
jne 0x4a5792
mov ecx, dword [esi + 0x64]
mov edx, dword [esi + 0x68]
sub ecx, edx
cmp ecx, 0x1000
jbe 0x4a5792
mov dword [esi + 0x58], ebp
mov eax, dword [esi + 0x70]
cmp eax, 3
jb 0x4a5923
cmp dword [esi + 0x58], eax
ja 0x4a5923
mov edx, dword [esi + 0x64]
mov eax, dword [esi + 0x6c]
mov cl, byte [esi + 0x70]
mov ebx, dword [esi + 0x169c]
lea ebp, [edx + eax - 3]
mov ax, dx
sub ax, word [esi + 0x5c]
mov edx, dword [esi + 0x1698]
sub cl, 3
dec eax
mov byte [esp + 0x18], cl
mov word [ebx + edx*2], ax
mov edx, dword [esi + 0x1690]
mov ebx, dword [esi + 0x1698]
add eax, 0xffff
mov byte [edx + ebx], cl
mov edx, dword [esi + 0x1698]
mov ecx, dword [esp + 0x18]
inc edx
mov dword [esi + 0x1698], edx
and ecx, 0xff
xor edx, edx
mov dl, byte [ecx + 0x54cd80]
inc word [esi + edx*4 + 0x490]
cmp ax, 0x100
lea ecx, [esi + edx*4 + 0x490]
jae 0x4a582c
and eax, 0xffff
xor ecx, ecx
mov cl, byte [eax + 0x54cb80]
mov eax, ecx
jmp 0x4a583e
and eax, 0xffff
shr eax, 7
xor edx, edx
mov dl, byte [eax + 0x54cc80]
mov eax, edx
inc word [esi + eax*4 + 0x980]
mov eax, dword [esi + 0x1694]
mov ecx, dword [esi + 0x1698]
mov edx, dword [esi + 0x6c]
dec eax
xor ebx, ebx
cmp ecx, eax
mov eax, dword [esi + 0x70]
mov ecx, 1
sete bl
sub ecx, eax
add edx, ecx
add eax, 0xfffffffe
mov dword [esi + 0x6c], edx
mov dword [esi + 0x70], eax
mov ecx, dword [esi + 0x64]
inc ecx
mov edx, ecx
mov dword [esi + 0x64], ecx
cmp edx, ebp
ja 0x4a58bd
mov eax, dword [esi + 0x40]
mov ecx, dword [esi + 0x50]
mov edi, dword [esi + 0x30]
shl eax, cl
xor ecx, ecx
mov cl, byte [edi + edx + 2]
mov edi, dword [esi + 0x4c]
xor eax, ecx
mov ecx, dword [esi + 0x3c]
and eax, edi
xor edi, edi
mov dword [esi + 0x40], eax
mov di, word [ecx + eax*2]
mov eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x38]
and eax, edx
mov word [ecx + eax*2], di
mov edx, dword [esi + 0x40]
mov eax, dword [esi + 0x3c]
mov cx, word [esi + 0x64]
mov word [eax + edx*2], cx
mov eax, dword [esi + 0x70]
dec eax
mov dword [esi + 0x70], eax
jne 0x4a5872
mov ecx, dword [esi + 0x64]
mov ebp, 2
inc ecx
mov dword [esi + 0x60], 0
test ebx, ebx
mov dword [esi + 0x58], ebp
mov dword [esi + 0x64], ecx
je 0x4a56b0
mov edx, dword [esi + 0x54]
test edx, edx
jl 0x4a58f2
mov eax, dword [esi + 0x30]
add eax, edx
jmp 0x4a58f4
xor eax, eax
sub ecx, edx
push 0
push ecx
push eax
push esi
call fcn.004a6330
xor byte [edx], cl
add byte [eax], al
xor byte [edx], cl
add byte [eax], al
mov eax, dword [esi]
mov edx, dword [esi + 0x64]
push eax
mov dword [esi + 0x54], edx
call fcn.004a4e70
mov ecx, dword [esi]
add esp, 0x14
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x4a5ac2
jmp 0x4a56b0
mov eax, dword [esi + 0x60]
test eax, eax
je 0x4a59e0
mov edx, dword [esi + 0x64]
mov eax, dword [esi + 0x30]
mov ecx, dword [esi + 0x1698]
mov al, byte [edx + eax - 1]
mov edx, dword [esi + 0x169c]
mov byte [esp + 0x10], al
mov word [edx + ecx*2], 0
mov ecx, dword [esi + 0x1690]
mov edx, dword [esi + 0x1698]
mov byte [ecx + edx], al
mov eax, dword [esp + 0x10]
mov edx, dword [esi + 0x1698]
and eax, 0xff
inc edx
lea eax, [esi + eax*4 + 0x8c]
mov dword [esi + 0x1698], edx
inc word [eax]
mov ecx, dword [esi + 0x1694]
mov eax, dword [esi + 0x1698]
dec ecx
cmp eax, ecx
jne 0x4a59c0
mov ecx, dword [esi + 0x54]
test ecx, ecx
jl 0x4a599e
mov edx, dword [esi + 0x30]
mov eax, ecx
add eax, edx
jmp 0x4a59a0
xor eax, eax
mov edx, dword [esi + 0x64]
push 0
sub edx, ecx
push edx
push eax
push esi
call fcn.004a6330
mov ecx, dword [esi]
mov eax, dword [esi + 0x64]
push ecx
mov dword [esi + 0x54], eax
call fcn.004a4e70
add esp, 0x14
mov edx, dword [esi + 0x64]
mov ecx, dword [esi + 0x6c]
inc edx
dec ecx
mov dword [esi + 0x64], edx
mov edx, dword [esi]
mov dword [esi + 0x6c], ecx
mov eax, dword [edx + 0x10]
test eax, eax
je 0x4a5ac2
jmp 0x4a56b0
mov ecx, dword [esi + 0x64]
mov eax, dword [esi + 0x6c]
inc ecx
dec eax
mov dword [esi + 0x60], 1
mov dword [esi + 0x64], ecx
mov dword [esi + 0x6c], eax
jmp 0x4a56b0
mov eax, dword [esi + 0x60]
test eax, eax
je 0x4a5a5d
mov eax, dword [esi + 0x64]
mov ecx, dword [esi + 0x30]
mov edx, dword [esi + 0x1698]
mov al, byte [eax + ecx - 1]
mov ecx, dword [esi + 0x169c]
mov byte [esp + 0x1c], al
mov word [ecx + edx*2], 0
mov edx, dword [esi + 0x1690]
mov ecx, dword [esi + 0x1698]
mov byte [edx + ecx], al
mov eax, dword [esi + 0x1698]
mov edx, dword [esp + 0x1c]
inc eax
and edx, 0xff
mov dword [esi + 0x1698], eax
inc word [esi + edx*4 + 0x8c]
mov dword [esi + 0x60], 0
lea eax, [esi + edx*4 + 0x8c]
mov ecx, dword [esi + 0x54]
test ecx, ecx
jl 0x4a5a6b
mov eax, dword [esi + 0x30]
add eax, ecx
jmp 0x4a5a6d
xor eax, eax
xor edx, edx
cmp ebx, 4
sete dl
push edx
mov edx, dword [esi + 0x64]
sub edx, ecx
push edx
push eax
push esi
call fcn.004a6330
mov ecx, dword [esi]
mov eax, dword [esi + 0x64]
push ecx
mov dword [esi + 0x54], eax
call fcn.004a4e70
mov edx, dword [esi]
add esp, 0x14
mov eax, dword [edx + 0x10]
test eax, eax
jne 0x4a5aae
xor eax, eax
cmp ebx, 4
setne al
dec eax
pop edi
and eax, ebp
pop esi
pop ebp
pop ebx
pop ecx
ret
mov eax, ebx
pop edi
sub eax, 4
pop esi
neg eax
sbb eax, eax
pop ebp
and al, 0xfe
pop ebx
add eax, 3
pop ecx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret