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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebx + 0x34]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
sub esp, 0x38
push esi
push edi
cmp eax, 1
jne 0x4be676
push edx
mov edx, ebx
call fcn.004bd350
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
cmp eax, 2
jne 0x4be68b
push ecx
push edx
push ebx
call fcn.004be050
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebx + 0x2c]
mov ecx, dword [ebx]
mov edi, dword [ebx + 0xc]
push eax
call fcn.004a5600
mov esi, dword [ebx]
cmp dword [esi + 0x2aa684], 8
jne 0x4be6ac
mov eax, dword [esi + 0x19dd28]
jmp 0x4be6bd
fld dword [esi + 0x19dd04]
fmul dword [esi + 0x19dcf4]
call fcn.00596d60
call fcn.004a6f20
mov ecx, dword [ebx + 0xc]
call fcn.004a5110
mov edi, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
xor eax, eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebx + 0xc]
cmp byte [eax + 0x58], 0
lea edx, [edi + ecx]
mov dword [ebp - 8], edi
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], edi
jne 0x4be6f5
mov esi, dword [eax + 0x5c]
jmp 0x4be6f7
xor esi, esi
mov eax, dword [ebx]
mov dword [ebp - 4], esi
test esi, esi
jne 0x4be708
mov dword [eax + 0x19dd4c], esi
jmp 0x4be730
mov ecx, esi
sar ecx, 0x10
mov edx, esi
and edx, 0xff
shl edx, 0x10
and ecx, 0xff
or ecx, edx
mov edx, esi
and edx, 0xff00ff00
or ecx, edx
mov dword [eax + 0x19dd4c], ecx
mov eax, dword [ebx]
cmp byte [eax + 0x30a3a4], 0
mov byte [ebp + 0xb], 0
je 0x4be7a9
add eax, 0x30a3ac
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4be747
sub eax, edx
mov dword [ebp - 0x20], eax
test eax, eax
jle 0x4be7a9
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.MSVCR100.dll_malloc]
mov esi, eax
add esp, 4
mov dword [ebp - 0xc], esi
test esi, esi
je 0x4be7a6
mov ecx, dword [ebp + 0xc]
push ecx
push edi
push esi
mov dword [ebp - 0x1c], esi
call sub.MSVCR100.dll_memcpy
xor eax, eax
add esp, 0xc
cmp dword [ebp + 0xc], eax
jle 0x4be7a2
mov ecx, dword [ebp + 0xc]
jmp 0x4be790
movzx edx, byte [eax + esi]
mov dl, byte [edx + 0x60d628]
mov byte [eax + esi], dl
inc eax
cmp eax, ecx
jl 0x4be790
mov byte [ebp + 0xb], 1
mov esi, dword [ebp - 4]
cmp edi, dword [ebp - 0x28]
jae 0x4bebca
cmp byte [ebp + 0xb], 0
je 0x4be88b
mov edi, dword [ebp - 0x24]
cmp dword [ebp - 8], edi
jb 0x4be88b
mov edx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x20]
mov eax, dword [ebp - 0xc]
add edx, dword [ebp + 0xc]
lea ecx, [esi + eax]
cmp ecx, edx
ja 0x4be819
mov eax, dword [ebx]
cmp byte [eax + 0x30a3a5], 0
push esi
je 0x4be7f9
mov ecx, dword [ebp - 0xc]
add eax, 0x30a3ac
push eax
push ecx
call dword [sym.imp.MSVCR100.dll_strncmp]
jmp 0x4be809
mov edx, dword [ebp - 0xc]
add eax, 0x30a3ac
push eax
push edx
call dword [sym.imp.MSVCR100.dll__strnicmp]
add esp, 0xc
test eax, eax
jne 0x4be819
mov eax, dword [ebp - 8]
lea edi, [esi + eax]
mov dword [ebp - 0x24], edi
cmp dword [ebp - 8], edi
jb 0x4be846
mov eax, dword [ebx + 0xc]
cmp byte [eax + 0x58], 0
jne 0x4be82c
mov ecx, dword [eax + 0x5c]
jmp 0x4be82e
xor ecx, ecx
cmp dword [ebp - 4], ecx
je 0x4be88b
cmp byte [eax + 0x58], 0
jne 0x4be840
mov eax, dword [eax + 0x5c]
mov ecx, dword [ebx]
jmp 0x4be853
mov ecx, dword [ebx]
xor eax, eax
jmp 0x4be853
mov ecx, dword [ebx]
mov eax, dword [ecx + 0x30a3a8]
cmp dword [ebp - 4], eax
je 0x4be88b
mov dword [ebp - 4], eax
test eax, eax
jne 0x4be866
mov dword [ecx + 0x19dd4c], 0
jmp 0x4be88b
mov esi, eax
mov edx, eax
sar edx, 0x10
and esi, 0xff
shl esi, 0x10
and edx, 0xff
and eax, 0xff00ff00
or edx, esi
or edx, eax
mov dword [ecx + 0x19dd4c], edx
cmp dword [ebp - 0xc], 0
je 0x4be894
inc dword [ebp - 0xc]
mov eax, dword [ebx + 0x1c]
mov dword [ebx + 0x1490], 0
cmp eax, 0xffffffff
jne 0x4be8b6
cmp dword [ebx + 0x14], 0
je 0x4be8bc
mov ecx, dword [ebp - 8]
movzx eax, byte [ecx]
inc ecx
mov dword [ebp - 8], ecx
mov dword [ebx + 0x1490], eax
mov ecx, dword [ebp - 8]
movzx eax, byte [ecx]
mov edx, dword [ebx + 0x14]
inc ecx
xor esi, esi
mov dword [ebp - 8], ecx
mov dword [ebx + 0x1494], eax
cmp edx, esi
je 0x4be8f2
cmp dword [ebx + 0x18], 1
jne 0x4be8f2
mov ecx, dword [ebx + 0x1490]
shl ecx, 8
or ecx, eax
mov dword [ebx + 0x1494], ecx
mov dword [ebx + 0x1490], esi
mov ecx, dword [ebx + 0x1490]
mov dword [ebx + 0x1498], esi
mov dword [ebx + 0x149c], esi
mov dword [ebx + 0x14a0], esi
mov dword [ebx + 0x14a4], esi
cmp dword [ebx + ecx*4 + 0x874], esi
je 0x4beb42
mov esi, dword [ebx + 0x20]
mov eax, dword [ebx + 0x1494]
mov edi, dword [ebx + ecx*4 + 0x874]
mov edi, dword [edi + 0x8cc]
lea eax, [esi + eax*4]
lea eax, [eax + eax*2]
lea eax, [edi + eax*4]
mov dword [ebx + 0x14a0], eax
mov eax, dword [eax]
mov dword [ebx + 0x14a4], eax
test eax, eax
je 0x4beb42
mov ecx, dword [eax]
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebx + 0xc]
mov edx, dword [ecx + 0x48]
add edx, esi
and edx, 3
mov dword [ebp - 0x18], edx
mov edx, dword [eax + 4]
add edx, 7
and edx, 0xfff8
mov dword [ebp - 0x14], edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 0x10]
mov dword [ebx + 0x1498], eax
mov dword [ebp - 0x10], edx
mov edx, dword [ebx + 0x14a4]
mov eax, dword [edx + 0x14]
mov dword [ebx + 0x149c], eax
add dword [ecx + 0x80], eax
mov eax, 0x10624dd3
imul dword [ecx + 0x80]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
xor edi, edi
xor esi, esi
test eax, eax
jle 0x4be9cd
mov edx, dword [ecx + 0x80]
mov edi, eax
imul edi, edi, 0x3e8
sub edx, edi
mov dword [ecx + 0x80], edx
mov edi, esi
mov edx, dword [ecx + 0x48]
test edx, edx
jne 0x4be9d9
add dword [ecx + 0x78], eax
jmp 0x4be9f5
cmp edx, 1
jne 0x4be9e3
add dword [ecx + 0x7c], eax
jmp 0x4be9f5
cmp edx, 2
jne 0x4be9ed
sub dword [ecx + 0x78], eax
jmp 0x4be9f5
cmp edx, 3
jne 0x4be9f5
sub dword [ecx + 0x7c], eax
mov eax, dword [ebx + 0xc]
mov ecx, dword [eax + 0x48]
mov edx, 1
mov dword [ebp - 0x30], edx
test ecx, ecx
jne 0x4bea44
mov ecx, dword [ebx + 0x14a4]
mov edi, dword [ecx + 0x24]
add edi, dword [eax + 0x78]
mov esi, dword [eax + 0x7c]
sub esi, dword [ecx + 0x30]
test edi, edi
js 0x4beaf4
test esi, esi
js 0x4beaf4
mov ecx, dword [ebp - 0x14]
add ecx, edi
cmp ecx, dword [eax + 0x1c]
jg 0x4beaf4
mov ecx, dword [ebp - 0x10]
add ecx, esi
cmp ecx, dword [eax + 0x20]
jmp 0x4beaf2
cmp ecx, 1
jne 0x4bea99
mov edx, dword [ebx + 0x14a4]
mov ecx, dword [edx + 0x30]
mov edi, dword [eax + 0x78]
mov esi, dword [edx + 0x24]
add esi, dword [eax + 0x7c]
add ecx, edi
mov edx, ecx
sub edx, dword [ebp - 0x10]
js 0x4bea78
test esi, esi
js 0x4bea78
cmp ecx, dword [eax + 0x1c]
jg 0x4bea78
mov ecx, dword [ebp - 0x14]
lea edx, [esi + ecx]
cmp edx, dword [eax + 0x20]
jle 0x4bea88
mov ecx, dword [ebx + 0x14a4]
sub edi, dword [ecx + 0x20]
xor edx, edx
sub edi, dword [ecx + 8]
jmp 0x4beaf6
mov ecx, dword [ebx + 0x14a4]
sub edi, dword [ecx + 0x20]
mov edx, dword [ebp - 0x30]
sub edi, dword [ecx + 8]
jmp 0x4beaf6
cmp ecx, 2
jne 0x4beac3
mov ecx, dword [ebx + 0x14a4]
mov edi, dword [eax + 0x78]
sub edi, dword [ecx + 0x24]
mov esi, dword [ecx + 0x30]
add esi, dword [eax + 0x7c]
mov ecx, edi
sub ecx, dword [ebp - 0x14]
js 0x4beaf4
mov ecx, esi
sub ecx, dword [ebp - 0x10]
js 0x4beaf4
cmp edi, dword [eax + 0x1c]
jmp 0x4beaed
cmp ecx, 3
jne 0x4beaf6
mov ecx, dword [ebx + 0x14a4]
mov edi, dword [eax + 0x78]
sub edi, dword [ecx + 0x30]
mov esi, dword [eax + 0x7c]
sub esi, dword [ecx + 0x24]
test edi, edi
js 0x4beaf4
mov ecx, esi
sub ecx, dword [ebp - 0x14]
js 0x4beaf4
mov ecx, dword [ebp - 0x10]
add ecx, edi
cmp ecx, dword [eax + 0x1c]
jg 0x4beaf4
cmp esi, dword [eax + 0x20]
jle 0x4beaf6
xor edx, edx
mov ecx, dword [ebp - 0x18]
inc dword [eax + ecx*4 + 0x68]
cmp ecx, 1
jne 0x4beb0b
mov dword [ebp - 0x18], 3
jmp 0x4beb17
cmp ecx, 3
jne 0x4beb17
mov dword [ebp - 0x18], 1
test edx, edx
je 0x4beb8a
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
push 0
push 0
push 0
push edx
mov edx, dword [ebp - 0x34]
push ecx
push eax
push edx
push ecx
push eax
mov eax, esi
mov esi, dword [ebx]
push edi
call fcn.004b7930
add esp, 0x28
jmp 0x4beb8a
mov eax, dword [ebx + 0x1494]
cmp eax, dword [ebx + 0x3c]
jne 0x4beb8a
test edx, edx
je 0x4beb56
cmp ecx, dword [ebx + 0x40]
jne 0x4beb8a
mov ecx, dword [ebx + 0xc]
cmp dword [ecx + 0xc4], 0
je 0x4beb72
mov eax, dword [ecx + 0xc8]
imul eax, dword [ecx + 0x38]
cdq
idiv dword [ecx + 0x34]
jmp 0x4beb79
mov edx, dword [ebx + 0x20]
mov eax, dword [ebx + edx*4 + 0x44]
mov dword [ebx + 0x1498], eax
mov eax, dword [ebx + 0x149c]
call fcn.004a5cf0
mov eax, dword [ebx + 0xc]
mov ecx, dword [eax + 0x48]
mov edx, dword [ebx + 0x1498]
test ecx, ecx
jne 0x4beb9f
add dword [eax + 0x78], edx
jmp 0x4bebbb
cmp ecx, 1
jne 0x4beba9
add dword [eax + 0x7c], edx
jmp 0x4bebbb
cmp ecx, 2
jne 0x4bebb3
sub dword [eax + 0x78], edx
jmp 0x4bebbb
cmp ecx, 3
jne 0x4bebbb
sub dword [eax + 0x7c], edx
mov ecx, dword [ebp - 0x28]
cmp dword [ebp - 8], ecx
jb 0x4be7b2
mov esi, dword [ebp - 4]
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.MSVCR100.dll_free]
mov eax, dword [ebx + 0xc]
add esp, 4
cmp byte [eax + 0x58], 0
jne 0x4bebe5
mov ecx, dword [eax + 0x5c]
jmp 0x4bebe7
xor ecx, ecx
cmp esi, ecx
je 0x4bec2b
cmp byte [eax + 0x58], 0
jne 0x4bebf6
mov eax, dword [eax + 0x5c]
jmp 0x4bebf8
xor eax, eax
mov ecx, dword [ebx]
test eax, eax
jne 0x4bec06
mov dword [ecx + 0x19dd4c], eax
jmp 0x4bec2b
mov edx, eax
mov esi, eax
sar edx, 0x10
and esi, 0xff
and edx, 0xff
shl esi, 0x10
or edx, esi
and eax, 0xff00ff00
or edx, eax
mov dword [ecx + 0x19dd4c], edx
mov ecx, dword [ebx + 0xc]
cmp dword [ecx + 0x60], 0
je case.default.0x4bec53
mov edx, dword [ebx + 0x20]
mov esi, dword [ebx + edx*4 + 0x54]
test esi, esi
jle case.default.0x4bec53
mov eax, dword [ecx + 0x48]
cmp eax, 3
ja case.default.0x4bec53
jmp dword [eax*4 + 0x4bed24]
mov edi, dword [ecx + 0x84]
mov eax, dword [ecx + 0x78]
push 0
push 0
push 0
push 0
push 8
push 8
push 0x5c7364
sub eax, edi
push esi
push eax
mov eax, dword [ebx + edx*4 + 0x64]
add eax, dword [ecx + 0x88]
push edi
jmp 0x4bed0a
mov eax, dword [ecx + 0x88]
push 0
push 0
push 0
push 3
push 8
push 8
push 0x5c7364
push esi
mov esi, dword [ecx + 0x7c]
mov ecx, dword [ecx + 0x84]
sub esi, eax
sub ecx, dword [ebx + edx*4 + 0x64]
push esi
push ecx
jmp 0x4bed0a
mov edi, dword [ecx + 0x78]
mov eax, dword [ecx + 0x84]
push 0
push 0
push 0
push 2
push 8
push 8
push 0x5c7364
sub eax, edi
push esi
push eax
mov eax, dword [ecx + 0x88]
sub eax, dword [ebx + edx*4 + 0x64]
push edi
jmp 0x4bed0a
mov eax, dword [ecx + 0x7c]
mov edx, dword [ebx + edx*4 + 0x64]
push 0
push 0
push 0
push 1
push 8
push 8
push 0x5c7364
push esi
mov esi, dword [ecx + 0x88]
sub esi, eax
add eax, 8
add edx, dword [ecx + 0x84]
push esi
push edx
mov esi, dword [ebx]
call fcn.004b7930
add esp, 0x28
mov ecx, dword [ebx + 0xc]
call fcn.004a5260
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8