Function at 0x4a20e0
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 0x4a214e
mov eax, dword [ebp + 0x2c]
mov edi, dword [ebp + 0x34]
mov ecx, dword [ebp + 0x28]
mov ebx, dword [ebp + 0x30]
cmp eax, edi
ja 0x4a2138
jb 0x4a2128
cmp ecx, ebx
jae 0x4a2138
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 0x4a214e
ja 0x4a214a
cmp dword [esp + 0x28], ecx
jb 0x4a214e
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 0x4a2184
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 0x4a2462
mov eax, dword [esi + 0x80]
cmp eax, dword [esp + 0x14]
jne 0x4a24a8
mov cl, byte [esi + 0x19]
cmp cl, 2
je 0x4a22a8
mov edi, dword [esp + 0x18]
sub edi, eax
mov eax, dword [esi + 0x20]
cmp edi, eax
jbe 0x4a21c3
mov edi, eax
test cl, cl
jne 0x4a21ea
cmp edi, ebx
jbe 0x4a21cd
mov edi, ebx
push edi
push edx
mov edx, dword [esi + 0x78]
add edx, dword [esi + 0x80]
push edx
call sub.MSVCRT.dll_memcpy
add dword [esp + 0x30], edi
add esp, 0xc
add dword [ebp + 8], edi
jmp 0x4a2202
movzx eax, byte [esi + 0xb]
mov ecx, dword [esi + 0x78]
add ecx, dword [esi + 0x80]
push edi
push eax
push ecx
call sub.MSVCRT.dll_memset
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 0x4a222f
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 0x4a2262
test byte [esi + 0x16], 4
je 0x4a2262
sub edx, ecx
and edx, 0xffffffe0
je 0x4a2262
mov eax, dword [esi + 0x78]
add edx, eax
add edx, ecx
push edx
lea edx, [eax + ecx]
lea ecx, [esi + 0x40]
call fcn.0049ae80
add dword [ebp + 0x30], edi
adc dword [ebp + 0x34], ebx
sub dword [esi + 0x20], edi
je 0x4a23d4
cmp byte [ebp + 2], bl
je 0x4a24b7
mov eax, dword [ebp + 0x2c]
cmp eax, dword [ebp + 0x34]
ja 0x4a24b7
jb 0x4a2294
mov ecx, dword [ebp + 0x28]
cmp ecx, dword [ebp + 0x30]
ja 0x4a24b7
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 0x4a22f4
cmp ebx, eax
jb 0x4a22fa
push eax
mov eax, dword [ebp + 8]
push eax
mov edi, edx
call fcn.004a1b80
mov edx, dword [esp + 0x24]
test eax, eax
jne 0x4a22ec
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 0x4a2359
mov eax, dword [esp + 0x28]
mov edi, dword [esp + 0x1c]
cmp ebx, eax
jbe 0x4a22fa
mov ebx, eax
test ebx, ebx
je 0x4a2331
test edi, edi
jne 0x4a2313
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 sub.MSVCRT.dll_memcpy
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 0x4a24de
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 0x4a2373
mov edx, dword [esi + 0x7c]
sub edx, edi
cmp ecx, edx
jbe 0x4a2373
mov ecx, edx
push ecx
mov ecx, dword [esi + 0x20]
push ebx
lea edx, [esi + 0x78]
push ecx
push edx
call fcn.004a17f0
test eax, eax
jne 0x4a216b
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 0x4a23d4
test byte [esi + 0x16], 4
je 0x4a23d4
mov eax, dword [esi + 0x80]
sub eax, ecx
and eax, 0xffffffe0
je 0x4a23d4
mov edx, dword [esi + 0x78]
add eax, edx
add eax, ecx
add edx, ecx
push eax
lea ecx, [esi + 0x40]
call fcn.0049ae80
cmp byte [esi + 0x18], 0
jne 0x4a242c
mov dword [esi], 6
cmp byte [ebp + 2], 0
je 0x4a2400
mov ecx, dword [ebp + 0x2c]
cmp ecx, dword [ebp + 0x34]
jb 0x4a2128
ja 0x4a2400
mov edx, dword [ebp + 0x28]
cmp edx, dword [ebp + 0x30]
jb 0x4a2128
mov eax, dword [esp + 0x14]
cmp dword [esi + 0x80], eax
je 0x4a2499
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 0x4a245a
mov dword [esi], 1
cmp byte [ebp + 2], 0
je 0x4a2499
mov ecx, dword [ebp + 0x2c]
cmp ecx, dword [ebp + 0x34]
jb 0x4a2128
ja 0x4a2499
mov edx, dword [ebp + 0x28]
cmp edx, dword [ebp + 0x30]
jb 0x4a2128
jmp 0x4a2499
mov dword [esi], 8
jmp 0x4a2499
cmp eax, 8
je 0x4a24ec
cmp eax, 5
je 0x4a212c
cmp eax, 3
je 0x4a252a
test ebx, ebx
je 0x4a2553
inc ecx
mov dword [ebp + 8], ecx
mov al, byte [edx]
lea ecx, [ebp + 0x38]
call fcn.004a1dd0
inc dword [esp + 0x24]
mov dword [esi], eax
cmp byte [esi + 0x1a], 0
je 0x4a2180
jmp 0x4a2162
pop edi
pop esi
pop ebp
mov eax, 0xb
pop ebx
add esp, 0x10
ret 8
cmp byte [esi + 0x19], bl
jne 0x4a24ca
mov edx, dword [esp + 0x10]
mov eax, 3
cmp edx, dword [ebp + 8]
je 0x4a24cf
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 0x4a2515
mov edx, dword [esi + 0x30]
cmp edx, dword [esi + 0x38]
jne 0x4a2506
mov eax, dword [esi + 0x34]
cmp eax, dword [esi + 0x3c]
je 0x4a2515
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 0x4a2533
mov ebx, eax
add dword [ebp + 8], ebx
sub eax, ebx
mov dword [esi + 0x20], eax
jne 0x4a2553
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