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

Disassembly:
sub esp, 0x6c
xor ecx, ecx
cmp eax, 3
sete cl
xor edx, edx
cmp eax, 4
sete dl
push ebp
mov ebp, dword [esp + 0x78]
mov dword [esp + 0x14], ecx
mov ecx, dword [ebp + 0x48]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x74]
cmp ecx, dword [edx + 0x18]
je 0x4c4da6
mov eax, 6
pop ebp
add esp, 0x6c
ret
cmp eax, dword [esp + 0x80]
je 0x4c4db9
mov eax, 0x13
pop ebp
add esp, 0x6c
ret
mov eax, dword [esp + 0x7c]
test eax, eax
push ebx
push esi
push edi
lea esi, [ebp + 0x6c]
je 0x4c4dd7
mov ecx, dword [eax + 4]
mov edx, dword [eax]
push ecx
push edx
push esi
call fcn.004b4950
add esp, 0xc
lea eax, [esp + 0x3c]
push eax
push esi
call fcn.004b48c0
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x50]
mov ebx, dword [esp + 0x48]
add eax, 0x3f
and eax, 0xffffffc0
mov dword [esp + 0x4c], eax
and edx, 0xffffffc0
sub eax, edx
sar eax, 6
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x88]
mov eax, dword [eax + 8]
add ecx, 0x3f
and ecx, 0xffffffc0
and ebx, 0xffffffc0
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x18]
mov esi, ecx
sub esi, ebx
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 0x9c]
sar esi, 6
add esp, 8
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x48], ecx
test byte [eax + 4], 1
lea edi, [ebp + 0x4c]
mov dword [esp + 0x18], esi
je 0x4c4e7e
mov ecx, dword [edi + 0xc]
mov edx, dword [esp + 0x1c]
push ecx
push edx
call fcn.004b5210
mov dword [edi + 0xc], 0
mov ebp, dword [ebp + 0x9c]
add esp, 8
and dword [ebp + 4], 0xfffffffe
mov ecx, dword [esp + 0x48]
mov ebx, dword [esp + 0x40]
mov edx, dword [esp + 0x3c]
cmp dword [esp + 0x20], 0
mov ebp, dword [esp + 0x10]
je 0x4c4e98
mov eax, ebp
lea ebp, [eax + eax*2]
mov dword [esp + 0x10], ebp
add ebp, 3
and ebp, 0xfffffffc
cmp dword [esp + 0x24], 0
je 0x4c4ea2
lea esi, [esi + esi*2]
mov dword [esp + 0x2c], ebx
neg ebx
mov eax, edx
push ebx
mov ebx, dword [esp + 0x88]
mov dword [esp + 0x34], edx
sar eax, 6
neg edx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x14]
push edx
sar ecx, 6
add ebx, 0x6c
push ebx
mov dword [esp + 0x44], ecx
mov byte [edi + 0x12], 2
mov word [edi + 0x10], pe_nt_image_headers32
mov dword [edi + 4], eax
mov dword [edi], esi
mov dword [edi + 8], ebp
call fcn.004b4950
mov eax, dword [esp + 0x28]
mov edx, ebp
imul edx, esi
lea ecx, [esp + 0x20]
push ecx
push edx
push eax
call fcn.004b5e50
mov dword [edi + 0xc], eax
mov eax, dword [esp + 0x2c]
add esp, 0x18
test eax, eax
jne 0x4c5022
mov ecx, dword [esp + 0x84]
mov eax, dword [ecx + 0x9c]
mov ecx, 1
or dword [eax + 4], ecx
mov eax, dword [esp + 0x80]
lea edx, [esp + 0x4c]
mov dword [esp + 0x54], ecx
mov ecx, dword [eax + 0x3c]
push edx
mov edx, dword [eax + 0x40]
push ecx
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], ebx
call edx
add esp, 8
cmp dword [esp + 0x20], 0
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
je 0x4c4fa5
test eax, eax
mov ebx, dword [edi + 0xc]
mov dword [esp + 0x80], eax
jbe 0x4c4fa5
add ebx, 0xffffffff
mov edx, dword [esp + 0x28]
test edx, edx
jbe 0x4c4f8e
mov eax, dword [esp + 0x10]
lea eax, [eax + ebx - 1]
movzx ecx, byte [ebx + edx]
mov byte [eax - 1], cl
mov byte [eax], cl
mov byte [eax + 1], cl
sub eax, 3
sub edx, 1
jne 0x4c4f76
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x80]
sub ecx, 1
add ebx, ebp
test ecx, ecx
mov dword [esp + 0x80], ecx
ja 0x4c4f66
cmp dword [esp + 0x24], 0
je 0x4c4fe8
mov edi, dword [edi + 0xc]
sub esi, eax
imul esi, ebp
add esi, edi
test eax, eax
mov ebx, eax
jbe 0x4c4fe8
lea esp, [esp]
push ebp
push esi
push edi
call fcn.004fff80
push ebp
add edi, ebp
push esi
push edi
call fcn.004fff80
push ebp
add edi, ebp
push esi
push edi
call fcn.004fff80
add esp, 0x24
add edi, ebp
add esi, ebp
sub ebx, 1
jne 0x4c4fc0
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
mov esi, dword [esp + 0x84]
push ecx
push edx
lea ebx, [esi + 0x6c]
push ebx
call fcn.004b4950
mov eax, dword [esp + 0x20]
add esp, 0xc
test eax, eax
jne 0x4c5022
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov dword [esi + 0x48], 0x62697473
mov dword [esi + 0x64], ecx
mov dword [esi + 0x68], edx
test ebx, ebx
je 0x4c5049
mov ecx, dword [esp + 0x88]
test ecx, ecx
je 0x4c5049
mov eax, dword [ecx + 4]
mov ecx, dword [ecx]
neg eax
push eax
neg ecx
push ecx
push ebx
call fcn.004b4950
mov eax, dword [esp + 0x20]
add esp, 0xc
pop edi
pop esi
pop ebx
pop ebp
add esp, 0x6c
ret