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

Disassembly:
sub esp, 0x10
push ebx
push ebp
mov ebp, dword [esp + 0x1c]
mov edx, dword [ebp + 4]
add edx, dword [ebp + 8]
cmp byte [ebp + 2], 0
push esi
mov esi, eax
mov ecx, dword [esi + 0x80]
mov eax, dword [ebp + 0xc]
push edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x24], edx
mov byte [ebp], 0
je 0x4a203e
mov eax, dword [ebp + 0x2c]
mov edi, dword [ebp + 0x34]
mov ecx, dword [ebp + 0x28]
mov ebx, dword [ebp + 0x30]
cmp eax, edi
ja 0x4a2028
jb 0x4a2018
cmp ecx, ebx
jae 0x4a2028
mov byte [ebp], 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 8
sub ecx, ebx
sbb eax, edi
xor edi, edi
cmp edi, eax
jb 0x4a203e
ja 0x4a203a
cmp dword [esp + 0x28], ecx
jb 0x4a203e
mov dword [esp + 0x28], ecx
mov eax, dword [esi + 0x80]
add eax, dword [esp + 0x28]
cmp byte [esi + 0x1a], 0
mov dword [esp + 0x18], eax
je 0x4a2074
mov byte [ebp], 0
mov eax, 1
pop edi
mov byte [esi + 0x1a], 1
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 8
mov edx, dword [esp + 0x24]
mov ecx, dword [ebp + 8]
mov ebx, dword [esp + 0x10]
mov eax, dword [esi]
sub ebx, ecx
cmp eax, 7
jne 0x4a2352
mov eax, dword [esi + 0x80]
cmp eax, dword [esp + 0x14]
jne 0x4a2398
mov cl, byte [esi + 0x19]
cmp cl, 2
je 0x4a2198
mov edi, dword [esp + 0x18]
sub edi, eax
mov eax, dword [esi + 0x20]
cmp edi, eax
jbe 0x4a20b3
mov edi, eax
test cl, cl
jne 0x4a20da
cmp edi, ebx
jbe 0x4a20bd
mov edi, ebx
push edi
push edx
mov edx, dword [esi + 0x78]
add edx, dword [esi + 0x80]
push edx
call fcn.004a5278
add dword [esp + 0x30], edi
add esp, 0xc
add dword [ebp + 8], edi
jmp 0x4a20f2
movzx eax, byte [esi + 0xb]
mov ecx, dword [esi + 0x78]
add ecx, dword [esi + 0x80]
push edi
push eax
push ecx
call fcn.004a5426
add esp, 0xc
mov eax, dword [esi + 0x80]
mov edx, dword [esi + 0x38]
mov ebx, dword [esi + 0x98]
and edx, 0x1f
mov ecx, eax
sub ecx, edx
lea edx, [eax + edi]
mov eax, dword [esi + 0x9c]
add eax, edi
mov dword [esi + 0x80], edx
cmp eax, ebx
jb 0x4a211f
mov eax, ebx
xor ebx, ebx
add dword [esi + 0x38], edi
mov dword [esi + 0x9c], eax
adc dword [esi + 0x3c], ebx
cmp byte [esi + 0x1c], bl
jne 0x4a2152
test byte [esi + 0x16], 4
je 0x4a2152
sub edx, ecx
and edx, 0xffffffe0
je 0x4a2152
mov eax, dword [esi + 0x78]
add edx, eax
add edx, ecx
push edx
lea edx, [eax + ecx]
lea ecx, [esi + 0x40]
call fcn.0049ad90
add dword [ebp + 0x30], edi
adc dword [ebp + 0x34], ebx
sub dword [esi + 0x20], edi
je 0x4a22c4
cmp byte [ebp + 2], bl
je 0x4a23a7
mov eax, dword [ebp + 0x2c]
cmp eax, dword [ebp + 0x34]
ja 0x4a23a7
jb 0x4a2184
mov ecx, dword [ebp + 0x28]
cmp ecx, dword [ebp + 0x30]
ja 0x4a23a7
pop edi
mov eax, 4
pop esi
mov byte [ebp], al
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 8
mov edi, dword [esi + 0x2c]
mov eax, dword [esi + 0x20]
sub eax, edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x28], eax
test edi, edi
jne 0x4a21e4
cmp ebx, eax
jb 0x4a21ea
push eax
mov eax, dword [ebp + 8]
push eax
mov edi, edx
call fcn.004a1a70
mov edx, dword [esp + 0x24]
test eax, eax
jne 0x4a21dc
mov ecx, dword [esp + 0x28]
mov eax, edx
add edx, ecx
mov dword [esp + 0x24], edx
mov edx, dword [ebp + 8]
sub ebx, ecx
add edx, ecx
mov dword [ebp + 8], edx
jmp 0x4a2249
mov eax, dword [esp + 0x28]
mov edi, dword [esp + 0x1c]
cmp ebx, eax
jbe 0x4a21ea
mov ebx, eax
test ebx, ebx
je 0x4a2221
test edi, edi
jne 0x4a2203
mov eax, dword [esi + 0x60]
xor ecx, ecx
mov dword [eax + 0x30], ecx
mov dword [eax + 0x34], ecx
mov dword [eax + 0x38], ecx
mov dword [eax + 0x3c], ecx
mov ecx, dword [esi + 0x60]
push ebx
push edx
lea edx, [ecx + edi + 0x40]
push edx
call fcn.004a5278
add dword [ebp + 8], ebx
add dword [esp + 0x30], ebx
add esp, 0xc
add edi, ebx
mov dword [esi + 0x2c], edi
xor eax, eax
cmp edi, dword [esi + 0x20]
jne 0x4a23ce
mov ecx, dword [esi + 0x60]
lea ecx, [ecx + edi + 0x40]
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov eax, dword [esi + 0x60]
add eax, 0x40
mov ebx, 0x40
cmp dword [ebp + 0x20], 0
mov edi, dword [esi + 0x80]
mov ecx, dword [esi + 0x28]
je 0x4a2263
mov edx, dword [esi + 0x7c]
sub edx, edi
cmp ecx, edx
jbe 0x4a2263
mov ecx, edx
push ecx
mov ecx, dword [esi + 0x20]
push ebx
lea edx, [esi + 0x78]
push ecx
push edx
call fcn.004a16f0
test eax, eax
jne 0x4a205b
mov edx, dword [esi + 0x38]
mov eax, dword [esi + 0x80]
and edx, 0x1f
mov ecx, edi
sub ecx, edx
xor edx, edx
sub eax, edi
add dword [ebp + 0x30], eax
adc dword [ebp + 0x34], edx
add dword [esi + 0x38], eax
adc dword [esi + 0x3c], edx
cmp byte [esi + 0x1c], dl
jne 0x4a22c4
test byte [esi + 0x16], 4
je 0x4a22c4
mov eax, dword [esi + 0x80]
sub eax, ecx
and eax, 0xffffffe0
je 0x4a22c4
mov edx, dword [esi + 0x78]
add eax, edx
add eax, ecx
add edx, ecx
push eax
lea ecx, [esi + 0x40]
call fcn.0049ad90
cmp byte [esi + 0x18], 0
jne 0x4a231c
mov dword [esi], 6
cmp byte [ebp + 2], 0
je 0x4a22f0
mov ecx, dword [ebp + 0x2c]
cmp ecx, dword [ebp + 0x34]
jb 0x4a2018
ja 0x4a22f0
mov edx, dword [ebp + 0x28]
cmp edx, dword [ebp + 0x30]
jb 0x4a2018
mov eax, dword [esp + 0x14]
cmp dword [esi + 0x80], eax
je 0x4a2389
mov eax, dword [esp + 0x10]
cmp eax, dword [ebp + 8]
pop edi
sete cl
add cl, 2
pop esi
mov byte [ebp], cl
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 8
test byte [esi + 0x16], 4
je 0x4a234a
mov dword [esi], 1
cmp byte [ebp + 2], 0
je 0x4a2389
mov ecx, dword [ebp + 0x2c]
cmp ecx, dword [ebp + 0x34]
jb 0x4a2018
ja 0x4a2389
mov edx, dword [ebp + 0x28]
cmp edx, dword [ebp + 0x30]
jb 0x4a2018
jmp 0x4a2389
mov dword [esi], 8
jmp 0x4a2389
cmp eax, 8
je 0x4a23dc
cmp eax, 5
je 0x4a201c
cmp eax, 3
je 0x4a241a
test ebx, ebx
je 0x4a2443
inc ecx
mov dword [ebp + 8], ecx
mov al, byte [edx]
lea ecx, [ebp + 0x38]
call fcn.004a1cc0
inc dword [esp + 0x24]
mov dword [esi], eax
cmp byte [esi + 0x1a], 0
je 0x4a2070
jmp 0x4a2052
pop edi
pop esi
pop ebp
mov eax, 0xb
pop ebx
add esp, 0x10
ret 8
cmp byte [esi + 0x19], bl
jne 0x4a23ba
mov edx, dword [esp + 0x10]
mov eax, 3
cmp edx, dword [ebp + 8]
je 0x4a23bf
mov eax, 2
pop edi
pop esi
mov byte [ebp], al
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 8
pop edi
pop esi
mov byte [ebp], 3
pop ebp
pop ebx
add esp, 0x10
ret 8
mov byte [ebp], 1
test byte [esi + 0x16], 0xe0
je 0x4a2405
mov edx, dword [esi + 0x30]
cmp edx, dword [esi + 0x38]
jne 0x4a23f6
mov eax, dword [esi + 0x34]
cmp eax, dword [esi + 0x3c]
je 0x4a2405
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10
ret 8
movzx eax, byte [esi + 0x1b]
pop edi
neg eax
pop esi
sbb eax, eax
pop ebp
and eax, 3
pop ebx
add esp, 0x10
ret 8
mov eax, dword [esi + 0x20]
cmp ebx, eax
jbe 0x4a2423
mov ebx, eax
add dword [ebp + 8], ebx
sub eax, ebx
mov dword [esi + 0x20], eax
jne 0x4a2443
pop edi
mov dword [esi], 0
pop esi
mov byte [ebp], 1
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 8
pop edi
pop esi
mov byte [ebp], 3
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 8