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

Disassembly:
sub esp, 0x24
push ebx
mov ebx, dword [esp + 0x2c]
mov dword [esp + 0x20], 7
mov eax, dword [ebx]
mov ecx, dword [eax + 0x10]
cmp ecx, 0xa
jne 0x4b1692
xor ax, ax
pop ebx
add esp, 0x24
ret
cmp ecx, 0xb
je 0x4b169f
mov dword [esp + 0x20], 6
mov ecx, dword [eax + 0xc]
mov eax, 1
sub ecx, 3
push ebp
shl eax, cl
push esi
push edi
push 0xc00
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x28], eax
lea ecx, [eax + eax]
sar eax, 1
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], eax
call fcn.004ad940
mov esi, eax
add esp, 4
test esi, esi
mov dword [esp + 0x28], esi
je 0x4b17c2
mov eax, dword [esi]
test eax, eax
mov dword [esp + 0x10], eax
je 0x4b17c2
mov edx, dword [ebx]
mov eax, dword [edx + 0x44]
test eax, eax
jne 0x4b1713
push 5
push ebx
call fcn.004aedb0
add esp, 8
test al, al
jne 0x4b1713
mov dword [esp + 0x40], 0xbc8
jmp 0x4b1d9a
mov eax, dword [ebx]
push 0
movsx ecx, word [eax + 0x36]
add ecx, 0xc
shl ecx, 0xb
push ecx
push ebx
call fcn.004a6470
push ebx
call fcn.004adaa0
mov edx, dword [ebx]
add esp, 0x10
mov eax, dword [edx + 0xa0]
test eax, eax
je 0x4b1755
mov edi, dword [eax]
push 1
mov eax, dword [edi + 0x18]
mov ecx, dword [eax]
movsx edx, word [ecx]
push edx
push ebx
call fcn.004a6470
add esp, 0xc
jmp 0x4b1781
push ebx
call fcn.004ad9a0
mov ecx, dword [ebx]
add esp, 4
mov dword [ecx + 0xa0], eax
mov edx, dword [ebx]
mov eax, dword [edx + 0xa0]
test eax, eax
jne 0x4b177f
mov dword [esp + 0x40], 0xbc8
jmp 0x4b1d9a
mov edi, dword [eax]
mov eax, dword [ebx]
mov eax, dword [eax + 0xa4]
test eax, eax
je 0x4b17a5
mov esi, dword [eax]
push 1
mov ecx, dword [esi + 0x18]
mov edx, dword [ecx]
movsx eax, word [edx]
push eax
push ebx
call fcn.004a6470
add esp, 0xc
jmp 0x4b17d1
push ebx
call fcn.004ad9a0
mov ecx, dword [ebx]
add esp, 4
mov dword [ecx + 0xa4], eax
mov edx, dword [ebx]
mov eax, dword [edx + 0xa4]
test eax, eax
jne 0x4b17cf
mov dword [esp + 0x40], 0xbc8
jmp 0x4b1d9a
mov esi, dword [eax]
mov ebx, dword [ebx]
mov ecx, dword [esp + 0x40]
mov eax, dword [ebx + 0x18]
mov ebx, dword [esp + 0x3c]
add ecx, eax
movsx ebp, word [ebx]
mov dword [esp + 0x14], ecx
add eax, ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x4b1816
mov eax, ebp
cdq
idiv ecx
mov ecx, dword [esp + 0x38]
mov edx, eax
mov eax, dword [ecx]
or edx, 1
mov eax, dword [eax + 0x44]
mov dx, word [eax + edx*2]
push edx
push ecx
call fcn.004a65e0
add esp, 8
push edi
call fcn.004add50
push esi
call fcn.004add50
mov eax, dword [esp + 0x2c]
add esp, 8
dec eax
and eax, ebp
mov dword [esp + 0x3c], eax
je 0x4b1989
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x4b185e
mov eax, ebp
push 2
cdq
idiv ecx
and al, 0xfe
push eax
push edi
call fcn.004ae7c0
add esp, 0xc
mov dword [esp + 0x40], eax
test ax, ax
jne 0x4b1d92
mov ecx, dword [esp + 0x10]
push 0x600
push ecx
push edi
call fcn.004ae070
mov dx, word [edi + 4]
add esp, 0xc
mov word [esi + 4], dx
mov ax, word [edi + 6]
mov word [esi + 6], ax
mov cx, word [edi + 0xc]
mov word [esi + 0xc], cx
mov ecx, dword [esp + 0x1c]
mov dl, byte [edi + 0xe]
test ecx, ecx
mov byte [esi + 0xe], dl
je 0x4b18b7
mov eax, ebp
push 3
cdq
idiv ecx
and al, 0xfe
push eax
push esi
call fcn.004ae7c0
add esp, 0xc
mov dword [esp + 0x40], eax
test ax, ax
jne 0x4b1d92
mov eax, dword [esp + 0x10]
push 0x600
add eax, 0x600
push eax
push esi
call fcn.004ae070
mov cx, word [esi + 4]
add esp, 0xc
mov word [edi + 4], cx
mov dx, word [esi + 6]
mov word [edi + 6], dx
mov ax, word [esi + 0xc]
mov word [edi + 0xc], ax
mov cl, byte [esi + 0xe]
mov eax, dword [esp + 0x24]
mov byte [edi + 0xe], cl
sub eax, dword [esp + 0x3c]
mov dword [esp + 0x40], eax
je 0x4b1989
add ebp, eax
jmp 0x4b1907
mov eax, dword [esp + 0x40]
mov edx, eax
and edx, 0xfffffffc
cmp eax, edx
jne 0x4b1936
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x44]
mov dx, word [ebx + 6]
push eax
mov ax, word [ebx + 2]
push ecx
mov ecx, dword [esp + 0x1c]
push edx
mov edx, dword [esp + 0x1c]
push eax
push ecx
push edx
call fcn.004aef20
add esp, 0x18
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x44]
mov dx, word [ebx + 6]
push eax
mov ax, word [ebx + 2]
push ecx
mov ecx, dword [esp + 0x20]
push edx
mov edx, dword [esp + 0x1c]
push eax
push ecx
lea eax, [edx + 0x600]
push eax
call fcn.004aef20
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
add edx, eax
add ecx, eax
mov eax, dword [esp + 0x58]
add esp, 0x18
dec eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x40], eax
jne 0x4b1903
movsx eax, word [ebx + 4]
sub eax, dword [esp + 0x24]
cmp ebp, eax
mov dword [esp + 0x30], eax
jge 0x4b1b00
movsx ecx, word [esp + 0x2c]
mov dword [esp + 0x3c], ecx
jmp 0x4b19ac
mov ecx, dword [esp + 0x3c]
mov eax, ebp
sar eax, cl
shl eax, cl
cmp ebp, eax
jne 0x4b19d0
mov ecx, dword [esp + 0x38]
push ecx
call fcn.004a9040
add esp, 4
mov dword [esp + 0x40], eax
test ax, ax
jne 0x4b1d92
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x4b19f6
mov eax, ebp
push 2
cdq
idiv ecx
push eax
push edi
call fcn.004ae7c0
add esp, 0xc
mov dword [esp + 0x40], eax
test ax, ax
jne 0x4b1d92
mov edx, dword [esp + 0x10]
push 0x600
push edx
push edi
call fcn.004ae070
mov ax, word [edi + 4]
add esp, 0xc
mov word [esi + 4], ax
mov cx, word [edi + 6]
mov word [esi + 6], cx
mov dx, word [edi + 0xc]
mov ecx, dword [esp + 0x1c]
mov word [esi + 0xc], dx
mov al, byte [edi + 0xe]
test ecx, ecx
mov byte [esi + 0xe], al
je 0x4b1a4d
mov eax, ebp
push 3
cdq
idiv ecx
push eax
push esi
call fcn.004ae7c0
add esp, 0xc
mov dword [esp + 0x40], eax
test ax, ax
jne 0x4b1d92
mov ecx, dword [esp + 0x10]
push 0x600
lea eax, [ecx + 0x600]
push eax
push esi
call fcn.004ae070
mov dx, word [esi + 4]
mov word [edi + 4], dx
mov ax, word [esi + 6]
mov word [edi + 6], ax
mov cx, word [esi + 0xc]
mov eax, dword [esp + 0x2c]
mov word [edi + 0xc], cx
mov dl, byte [esi + 0xe]
mov ecx, dword [esp + 0x50]
mov byte [edi + 0xe], dl
mov dx, word [ebx + 6]
push eax
mov ax, word [ebx + 2]
push ecx
mov ecx, dword [esp + 0x28]
push edx
mov edx, dword [esp + 0x28]
push eax
push ecx
push edx
call fcn.004aef20
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x68]
mov dx, word [ebx + 6]
push eax
mov ax, word [ebx + 2]
push ecx
mov ecx, dword [esp + 0x44]
push edx
mov edx, dword [esp + 0x40]
push eax
push ecx
lea eax, [edx + 0x600]
push eax
call fcn.004aef20
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x50]
mov eax, ecx
add ebp, ecx
imul eax, dword [esp + 0x84]
add edx, eax
add esp, 0x3c
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x18]
add edx, eax
mov eax, dword [esp + 0x30]
cmp ebp, eax
mov dword [esp + 0x18], edx
jl 0x4b19a8
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x4b1b26
mov eax, ebp
push 2
cdq
idiv ecx
push eax
push edi
call fcn.004ae7c0
add esp, 0xc
mov dword [esp + 0x40], eax
test ax, ax
jne 0x4b1d92
mov eax, dword [esp + 0x10]
push 0x600
push eax
push edi
call fcn.004ae070
mov cx, word [edi + 4]
add esp, 0xc
mov word [esi + 4], cx
mov dx, word [edi + 6]
mov word [esi + 6], dx
mov ax, word [edi + 0xc]
mov word [esi + 0xc], ax
mov cl, byte [edi + 0xe]
mov byte [esi + 0xe], cl
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x4b1b7d
mov eax, ebp
push 3
cdq
idiv ecx
push eax
push esi
call fcn.004ae7c0
add esp, 0xc
mov dword [esp + 0x40], eax
test ax, ax
jne 0x4b1d92
mov edx, dword [esp + 0x10]
push 0x600
lea eax, [edx + 0x600]
push eax
push esi
call fcn.004ae070
mov ax, word [esi + 4]
mov word [edi + 4], ax
mov cx, word [esi + 6]
mov word [edi + 6], cx
mov dx, word [esi + 0xc]
mov ecx, dword [esp + 0x2c]
mov word [edi + 0xc], dx
mov al, byte [esi + 0xe]
mov edx, dword [esp + 0x50]
mov byte [edi + 0xe], al
mov ax, word [ebx + 6]
push ecx
mov cx, word [ebx + 2]
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x28]
push ecx
push edx
push eax
call fcn.004aef20
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x68]
mov ax, word [ebx + 6]
push ecx
mov cx, word [ebx + 2]
push edx
mov edx, dword [esp + 0x44]
push eax
mov eax, dword [esp + 0x40]
push ecx
add eax, 0x600
push edx
push eax
call fcn.004aef20
mov eax, dword [esp + 0x84]
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x54]
add ecx, eax
mov dword [esp + 0x50], ecx
add esp, 0x3c
movsx ecx, word [ebx + 4]
add edx, eax
inc ebp
cmp ebp, ecx
mov dword [esp + 0x18], edx
jge 0x4b1d7b
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x4b1ce9
lea eax, [ebp - 1]
cdq
idiv ecx
lea edx, [eax + 2]
cmp edx, 0x800
jge 0x4b1ce9
add eax, 2
push 2
push eax
push edi
mov dword [esp + 0x48], eax
call fcn.004ae7c0
add esp, 0xc
mov dword [esp + 0x40], eax
test ax, ax
jne 0x4b1d92
mov eax, dword [esp + 0x10]
push 0x600
push eax
push edi
call fcn.004ae070
mov cx, word [edi + 4]
push 3
mov word [esi + 4], cx
mov dx, word [edi + 6]
mov word [esi + 6], dx
mov ax, word [edi + 0xc]
mov edx, dword [esp + 0x4c]
mov word [esi + 0xc], ax
mov cl, byte [edi + 0xe]
push edx
push esi
mov byte [esi + 0xe], cl
call fcn.004ae7c0
add esp, 0x18
mov dword [esp + 0x40], eax
test ax, ax
jne 0x4b1d92
mov eax, dword [esp + 0x10]
push 0x600
add eax, 0x600
push eax
push esi
call fcn.004ae070
mov cx, word [esi + 4]
add esp, 0xc
mov word [edi + 4], cx
mov dx, word [esi + 6]
mov word [edi + 6], dx
mov ax, word [esi + 0xc]
mov word [edi + 0xc], ax
mov cl, byte [esi + 0xe]
mov byte [edi + 0xe], cl
movsx edx, word [ebx + 4]
cmp ebp, edx
jge 0x4b1d7b
mov eax, ebp
and al, 0
cmp ebp, eax
jne 0x4b1d13
mov ecx, dword [esp + 0x38]
push ecx
call fcn.004a9040
add esp, 4
mov dword [esp + 0x40], eax
test ax, ax
jne 0x4b1d92
mov edx, dword [esp + 0x20]
mov esi, dword [esp + 0x44]
mov ax, word [ebx + 6]
mov cx, word [ebx + 2]
mov edi, dword [esp + 0x10]
push edx
mov edx, dword [esp + 0x18]
push esi
push eax
push ecx
push edx
push edi
call fcn.004aef20
mov eax, dword [esp + 0x38]
mov cx, word [ebx + 6]
mov dx, word [ebx + 2]
push eax
push esi
mov esi, dword [esp + 0x38]
push ecx
push edx
lea eax, [edi + 0x600]
push esi
push eax
call fcn.004aef20
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x44]
add ecx, eax
add esi, eax
movsx eax, word [ebx + 4]
add esp, 0x30
inc ebp
cmp ebp, eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], esi
jl 0x4b1cf5
mov ecx, dword [esp + 0x28]
push ecx
call fcn.004ad980
add esp, 4
xor eax, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x40], eax
mov esi, dword [esp + 0x28]
mov ebx, dword [esp + 0x38]
mov edx, dword [ebx]
mov eax, dword [edx + 0x44]
test eax, eax
je 0x4b1db5
push eax
call fcn.004c84ce
mov eax, dword [ebx]
add esp, 4
mov dword [eax + 0x44], 0
test esi, esi
je 0x4b1dc2
push esi
call fcn.004ad980
add esp, 4
mov ax, word [esp + 0x40]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret