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

Disassembly:
sub esp, 0x60
mov edx, dword [esp + 0x64]
push ebx
push ebp
push esi
mov esi, dword [edx + 0xc]
xor ebp, ebp
mov ebx, dword [edx]
mov dword [esp + 0x2c], 0xffffffff
mov dword [esp + 0x24], ebx
movzx eax, byte [esi + 0x10]
mov ebx, dword [ebx + 4]
add ebx, 8
mov dword [esp + 0x18], 1
push edi
lea ecx, [eax + eax*4]
mov eax, dword [edx + 4]
shl ecx, 4
add ebx, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ebx
mov edi, dword [ebx + 0x4c]
mov ecx, dword [ebx + 0x10]
mov dword [esp + 0x10], ecx
test edi, edi
jne 0x4bc6af
test byte [ecx + 0x2a], 0x20
je 0x4bc64c
mov edi, dword [ecx + 8]
jmp 0x4bc6af
push 0x38
lea eax, [esp + 0x3c]
push 0
push eax
call sub.MSVCRT.dll_memset
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x3c]
mov dword [esp + 0x48], eax
add esp, 0xc
lea eax, [esp + 0x20]
mov dword [esp + 0x66], 0x10001
mov dword [esp + 0x40], eax
mov byte [esp + 0x6a], 5
mov dword [esp + 0x44], ecx
movzx eax, word [ecx + 0x28]
mov word [esp + 0x64], ax
movzx eax, word [ecx + 0x26]
mov word [esp + 0x20], ax
xor eax, eax
mov word [esp + 0x22], ax
test byte [ebx + 0x28], 1
jne 0x4bc6ab
mov eax, dword [ebx + 0x10]
mov eax, dword [eax + 8]
mov dword [esp + 0x4c], eax
lea edi, [esp + 0x38]
movzx eax, word [ecx + 0x26]
mov dword [esp + 0x2c], eax
cmp ax, 0xa
jg 0x4bc6c1
xor eax, eax
jmp 0x4bc6d8
cwde
cdq
push edx
push eax
call fcn.00491c60
mov ecx, dword [esp + 0x18]
add esp, 8
sub ax, 0x21
movzx eax, ax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x74]
cmp dword [eax + 0x10], ebp
jne 0x4bc822
mov eax, dword [esp + 0x28]
test byte [eax + 0x22], 0x80
jne 0x4bc822
mov eax, dword [eax]
mov eax, dword [eax]
test dword [eax + 0x18], 0x100000
je 0x4bc822
cmp dword [ebx + 0x4c], ebp
jne 0x4bc822
mov eax, dword [ebx + 0x28]
test al, 1
jne 0x4bc822
test byte [ecx + 0x2a], 0x20
jne 0x4bc822
test al, 0xa
jne 0x4bc822
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + 0xc]
mov ebx, dword [ecx + 0x14]
lea eax, [eax + eax*2]
shl eax, 4
add eax, ebx
mov dword [esp + 0x34], eax
cmp ebx, eax
jae 0x4bc816
mov ecx, dword [esi + 8]
mov eax, dword [esi + 0xc]
and ecx, dword [ebx + 0x20]
and eax, dword [ebx + 0x24]
or ecx, eax
jne 0x4bc7fd
push ecx
push ecx
push dword [esp + 0x20]
push ebx
call fcn.004b47d0
add esp, 0x10
test eax, eax
je 0x4bc7fd
mov eax, dword [esi + 0x30]
mov ecx, 1
mov edx, dword [esp + 0x24]
mov word [esi + 0x18], cx
mov dword [esi + 0x28], ecx
mov ecx, dword [esp + 0x10]
mov dword [esi + 0x1c], 0
mov dword [eax], ebx
mov eax, dword [esp + 0x2c]
add eax, 4
add eax, edx
mov word [esi + 0x12], ax
cmp dword [ecx + 0xc], 0
jne 0x4bc7b7
test byte [ecx + 0x2a], 2
jne 0x4bc7b7
add eax, 0x18
mov word [esi + 0x12], ax
mov eax, 0x2b
push eax
push edx
mov word [esi + 0x16], ax
call fcn.00491d00
mov ecx, dword [esp + 0x80]
mov word [esi + 0x14], ax
mov eax, dword [esp + 0x84]
mov dword [esi + 0x24], 0x4000
or ecx, dword [ebx + 0x20]
or eax, dword [ebx + 0x24]
push esi
push dword [esp + 0x80]
mov dword [esi], ecx
mov dword [esi + 4], eax
call fcn.004bde10
add esp, 0x10
mov ebp, eax
mov eax, dword [esp + 0x34]
add ebx, 0x30
test ebp, ebp
je 0x4bc744
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x60
ret
test ebp, ebp
jne 0x4bc9d2
mov ebx, dword [esp + 0x18]
test edi, edi
je 0x4bc9d2
mov eax, dword [edi + 0x24]
test eax, eax
je 0x4bc849
push eax
push dword [esp + 0x18]
push dword [ebx + 0x30]
call fcn.004bfe40
add esp, 0xc
test eax, eax
je 0x4bc9c3
mov eax, dword [edi + 8]
movzx ebp, word [eax]
xor eax, eax
mov word [esi + 0x18], ax
mov dword [esi + 0x28], eax
mov byte [esi + 0x11], al
mov word [esi + 0x12], ax
mov eax, dword [esp + 0x78]
mov dword [esi], eax
mov eax, dword [esp + 0x7c]
mov dword [esi + 4], eax
mov word [esi + 0x16], bp
mov dword [esi + 0x1c], edi
push dword [ebx + 0x30]
push edi
push dword [esp + 0x7c]
call fcn.004659a0
add esp, 0xc
mov ebx, eax
cmp dword [edi + 0x28], 0
jg 0x4bc8a5
neg ebx
mov dword [esi + 0x24], 0x100
lea eax, [ebp + 0x10]
sbb bl, bl
and bl, byte [esp + 0x1c]
mov byte [esi + 0x11], bl
jmp 0x4bc97d
test byte [edi + 0x34], 0x20
je 0x4bc8c0
xor eax, eax
mov dword [esi + 0x24], 0x240
xor edx, edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], edx
jmp 0x4bc8f2
push edi
call fcn.00449f90
mov ecx, dword [esp + 0x1c]
not eax
not edx
add esp, 4
and eax, dword [ecx + 0x40]
and edx, dword [ecx + 0x44]
mov ecx, eax
or ecx, edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], edx
mov ecx, 0x240
je 0x4bc8ef
mov ecx, 0x200
mov dword [esi + 0x24], ecx
test ebx, ebx
jne 0x4bc93c
mov ecx, dword [esp + 0x10]
test byte [ecx + 0x2a], 0x20
jne 0x4bc93c
or eax, edx
jne 0x4bc9a4
test byte [edi + 0x34], 4
jne 0x4bc9a4
mov ax, word [edi + 0x2c]
cmp ax, word [ecx + 0x28]
jge 0x4bc9a4
mov eax, dword [esp + 0x28]
test byte [eax + 0x22], 4
jne 0x4bc9a4
cmp dword [0x4e2578], ebx
je 0x4bc9a4
mov eax, dword [eax]
mov eax, dword [eax]
test byte [eax + 0x3c], 0x40
jne 0x4bc9a4
neg ebx
sbb bl, bl
and bl, byte [esp + 0x1c]
mov byte [esi + 0x11], bl
movsx ecx, word [edi + 0x2c]
mov eax, ecx
shl eax, 4
sub eax, ecx
mov ecx, dword [esp + 0x10]
cdq
movsx ecx, word [ecx + 0x28]
idiv ecx
lea ecx, [eax + 1]
mov eax, dword [esp + 0x24]
add ecx, ebp
or eax, dword [esp + 0x2c]
mov word [esi + 0x14], cx
je 0x4bc981
lea eax, [ebp + 0x10]
push eax
push ecx
call fcn.00491d00
add esp, 8
mov word [esi + 0x14], ax
push ebp
push esi
push dword [esp + 0x1c]
call fcn.004bdf20
push esi
push dword [esp + 0x84]
call fcn.004bde10
add esp, 0x14
mov word [esi + 0x16], bp
test eax, eax
jne 0x4bc9d4
mov ebx, dword [esp + 0x18]
push 0
push edi
push ebx
push dword [esp + 0x80]
call fcn.004bc9e0
add esp, 0x10
mov ebp, eax
cmp dword [ebx + 0x4c], 0
jne 0x4bc9d2
inc dword [esp + 0x1c]
mov edi, dword [edi + 0x14]
test ebp, ebp
je 0x4bc822
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret