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

Disassembly:
mov eax, dword [esp + 0x40]
cmp dword [eax + 0x30], 0
je 0x46b5c2
mov edx, dword [esp]
mov ecx, dword [edx + 0x98]
cmp ecx, dword [esp + 0xc]
jae 0x46af44
mov eax, dword [esp + 0x40]
mov edx, dword [eax + 0xc]
mov dword [esp + 0x20], edx
mov ecx, dword [esp + 0x20]
add ecx, ecx
mov dword [esp + 0x24], ecx
xor eax, eax
mov dword [esp + 0x4c], eax
jmp 0x46af7c
mov edx, dword [esp + 0x40]
mov eax, dword [edx + 0x20]
mov edx, dword [esp + 0x40]
mov ecx, dword [edx + 0xc]
xor edx, edx
div ecx
mov dword [esp + 0x20], edx
cmp dword [esp + 0x20], 0
jne 0x46af6c
mov eax, dword [esp + 0x40]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x20], eax
mov edx, dword [esp + 0x20]
mov dword [esp + 0x24], edx
mov dword [esp + 0x4c], 1
mov ecx, dword [esp]
cmp dword [ecx + 0x98], 0
jbe 0x46afdd
mov eax, dword [esp + 0x40]
mov edx, dword [eax + 0xc]
add dword [esp + 0x24], edx
mov ecx, dword [esp + 0x24]
push ecx
push 0
mov eax, dword [esp + 8]
mov edx, dword [esp + 0x48]
mov ecx, dword [eax + 0x98]
mov eax, dword [esp + 0x10]
dec ecx
imul ecx, dword [edx + 0xc]
mov edx, dword [esp + 0x20]
mov edx, dword [eax + edx*4 + 0x48]
mov eax, dword [esp + 8]
mov ebx, dword [eax + 4]
call dword [ebx + 0x20]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x40]
mov edx, dword [eax + 0xc]
shl edx, 2
add dword [esp + 0x28], edx
xor ecx, ecx
mov dword [esp + 0x48], ecx
jmp 0x46b008
mov eax, dword [esp + 0x24]
push eax
push 0
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x10]
mov ebx, dword [eax + 4]
mov edx, dword [edx + ecx*4 + 0x48]
xor ecx, ecx
call dword [ebx + 0x20]
mov dword [esp + 0x28], eax
mov dword [esp + 0x48], 1
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 8]
shl ecx, 3
mov edx, dword [eax + 0x70]
lea ecx, [ecx + ecx*2]
add edx, ecx
mov dword [esp + 0x50], edx
mov eax, dword [esp + 0x40]
mov edx, dword [eax + 0x4c]
mov dword [esp + 0x54], edx
mov ecx, dword [esp + 0x54]
movzx eax, word [ecx]
mov dword [esp + 0x58], eax
mov edx, dword [esp + 0x54]
movzx ecx, word [edx + 2]
mov dword [esp + 0x5c], ecx
mov eax, dword [esp + 0x54]
movzx edx, word [eax + 0x10]
mov dword [esp + 0x64], edx
mov ecx, dword [esp + 0x54]
movzx eax, word [ecx + 0x20]
mov dword [esp + 0x6c], eax
mov edx, dword [esp + 0x54]
movzx ecx, word [edx + 0x12]
mov dword [esp + 0x68], ecx
mov eax, dword [esp + 0x54]
movzx edx, word [eax + 4]
mov dword [esp + 0x60], edx
mov ecx, dword [esp]
mov edx, dword [esp + 0x18]
mov eax, dword [ecx + 0x1b8]
mov ecx, dword [eax + edx*4 + 4]
mov dword [esp + 0x44], ecx
mov eax, dword [esp + 4]
mov edx, dword [esp + 0x18]
mov ecx, dword [eax + edx*4]
xor eax, eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 0x28]
mov ecx, edx
mov dword [esp + 0x94], ecx
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x20]
jge 0x46b5c2
mov edx, dword [esp + 0x94]
mov ecx, dword [edx]
mov dword [esp + 0x2c], ecx
cmp dword [esp + 0x48], 0
je 0x46b0db
cmp dword [esp + 0x1c], 0
jne 0x46b0db
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x30], eax
jmp 0x46b0e9
mov edx, dword [esp + 0x94]
mov ecx, dword [edx - 4]
mov dword [esp + 0x30], ecx
cmp dword [esp + 0x4c], 0
je 0x46b105
mov eax, dword [esp + 0x20]
dec eax
cmp eax, dword [esp + 0x1c]
jne 0x46b105
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x34], edx
jmp 0x46b113
mov ecx, dword [esp + 0x94]
mov eax, dword [ecx + 4]
mov dword [esp + 0x34], eax
mov edx, dword [esp + 0x30]
movsx ecx, word [edx]
mov dword [esp + 0x78], ecx
mov dword [esp + 0x74], ecx
mov dword [esp + 0x70], ecx
mov eax, dword [esp + 0x2c]
movsx edx, word [eax]
mov dword [esp + 0x80], edx
mov dword [esp + 0x7c], edx
mov eax, dword [esp + 0x34]
mov esi, edx
movsx edx, word [eax]
mov dword [esp + 0x8c], edx
mov dword [esp + 0x88], edx
mov dword [esp + 0x84], edx
xor eax, eax
mov dword [esp + 0x3c], eax
xor edx, edx
mov ecx, dword [esp + 0x40]
mov eax, dword [ecx + 0x1c]
dec eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edx
mov ecx, dword [esp + 0x10]
cmp ecx, dword [esp + 0x14]
ja 0x46b59a
lea edx, [esp + 0x98]
mov ecx, 1
mov eax, dword [esp + 0x2c]
call fcn.0046ed90
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x14]
jae 0x46b1ce
mov edx, dword [esp + 0x30]
movsx ecx, word [edx + 0x80]
mov dword [esp + 0x78], ecx
mov eax, dword [esp + 0x2c]
movsx edx, word [eax + 0x80]
mov dword [esp + 0x80], edx
mov ecx, dword [esp + 0x34]
movsx eax, word [ecx + 0x80]
mov dword [esp + 0x8c], eax
mov edx, dword [esp + 0x50]
mov ebx, dword [edx + 4]
test ebx, ebx
je 0x46b270
cmp word [esp + 0x9a], 0
jne 0x46b270
mov ecx, esi
sub ecx, dword [esp + 0x80]
imul ecx, dword [esp + 0x58]
shl ecx, 2
lea ecx, [ecx + ecx*8]
test ecx, ecx
jl 0x46b236
mov eax, dword [esp + 0x5c]
mov edx, dword [esp + 0x5c]
shl eax, 7
shl edx, 8
add eax, ecx
mov ecx, edx
cdq
idiv ecx
test ebx, ebx
jle 0x46b268
mov ecx, ebx
mov edx, 1
shl edx, cl
cmp eax, edx
jl 0x46b268
mov ecx, ebx
mov eax, 1
shl eax, cl
dec eax
jmp 0x46b268
mov eax, dword [esp + 0x5c]
mov edx, dword [esp + 0x5c]
shl eax, 7
shl edx, 8
sub eax, ecx
mov ecx, edx
cdq
idiv ecx
test ebx, ebx
jle 0x46b266
mov ecx, ebx
mov edx, 1
shl edx, cl
cmp eax, edx
jl 0x46b266
mov ecx, ebx
mov eax, 1
shl eax, cl
dec eax
neg eax
mov word [esp + 0x9a], ax
mov edx, dword [esp + 0x50]
mov ebx, dword [edx + 8]
test ebx, ebx
je 0x46b315
cmp word [esp + 0xa8], 0
jne 0x46b315
mov eax, dword [esp + 0x74]
sub eax, dword [esp + 0x88]
imul dword [esp + 0x58]
mov ecx, eax
shl ecx, 2
lea ecx, [ecx + ecx*8]
test ecx, ecx
jl 0x46b2db
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x64]
shl eax, 7
shl edx, 8
add eax, ecx
mov ecx, edx
cdq
idiv ecx
test ebx, ebx
jle 0x46b30d
mov ecx, ebx
mov edx, 1
shl edx, cl
cmp eax, edx
jl 0x46b30d
mov ecx, ebx
mov eax, 1
shl eax, cl
dec eax
jmp 0x46b30d
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x64]
shl eax, 7
shl edx, 8
sub eax, ecx
mov ecx, edx
cdq
idiv ecx
test ebx, ebx
jle 0x46b30b
mov ecx, ebx
mov edx, 1
shl edx, cl
cmp eax, edx
jl 0x46b30b
mov ecx, ebx
mov eax, 1
shl eax, cl
dec eax
neg eax
mov word [esp + 0xa8], ax
mov edx, dword [esp + 0x50]
mov ebx, dword [edx + 0xc]
test ebx, ebx
je 0x46b3bd
cmp word [esp + 0xb8], 0
jne 0x46b3bd
mov eax, dword [esp + 0x74]
mov edx, dword [esp + 0x7c]
add eax, dword [esp + 0x88]
add edx, edx
sub eax, edx
imul dword [esp + 0x58]
lea ecx, [eax + eax*8]
test ecx, ecx
jl 0x46b383
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x6c]
shl eax, 7
shl edx, 8
add eax, ecx
mov ecx, edx
cdq
idiv ecx
test ebx, ebx
jle 0x46b3b5
mov ecx, ebx
mov edx, 1
shl edx, cl
cmp eax, edx
jl 0x46b3b5
mov ecx, ebx
mov eax, 1
shl eax, cl
dec eax
jmp 0x46b3b5
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x6c]
shl eax, 7
shl edx, 8
sub eax, ecx
mov ecx, edx
cdq
idiv ecx
test ebx, ebx
jle 0x46b3b3
mov ecx, ebx
mov edx, 1
shl edx, cl
cmp eax, edx
jl 0x46b3b3
mov ecx, ebx
mov eax, 1
shl eax, cl
dec eax
neg eax
mov word [esp + 0xb8], ax
mov edx, dword [esp + 0x50]
mov ebx, dword [edx + 0x10]
test ebx, ebx
je 0x46b468
pushfd
add byte [eax], al
invalid
pushfd
add byte [eax], al
add byte [esi - 0x7d], ah
mov esp, 0xaa24
add byte [eax], al
cmp word [esp + 0xaa], 0
jne 0x46b468
mov eax, dword [esp + 0x70]
sub eax, dword [esp + 0x78]
sub eax, dword [esp + 0x84]
add eax, dword [esp + 0x8c]
imul dword [esp + 0x58]
lea ecx, [eax + eax*4]
test ecx, ecx
jl 0x46b42e
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x68]
shl eax, 7
shl edx, 8
add eax, ecx
mov ecx, edx
cdq
idiv ecx
test ebx, ebx
jle 0x46b460
mov ecx, ebx
mov edx, 1
shl edx, cl
cmp eax, edx
jl 0x46b460
mov ecx, ebx
mov eax, 1
shl eax, cl
dec eax
jmp 0x46b460
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x68]
shl eax, 7
shl edx, 8
sub eax, ecx
mov ecx, edx
cdq
idiv ecx
test ebx, ebx
jle 0x46b45e
mov ecx, ebx
mov edx, 1
shl edx, cl
cmp eax, edx
jl 0x46b45e
mov ecx, ebx
mov eax, 1
shl eax, cl
dec eax
neg eax
mov word [esp + 0xaa], ax
mov edx, dword [esp + 0x50]
mov ebx, dword [edx + 0x14]
test ebx, ebx
je 0x46b50d
cmp word [esp + 0x9c], 0
jne 0x46b50d
add esi, dword [esp + 0x80]
mov eax, dword [esp + 0x7c]
add eax, eax
shr byte [ebx], 0xf0
imul esi, dword [esp + 0x58]
lea ecx, [esi + esi*8]
test ecx, ecx
jl 0x46b4d3
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x60]
shl eax, 7
shl edx, 8
add eax, ecx
mov ecx, edx
cdq
idiv ecx
test ebx, ebx
jle 0x46b505
mov ecx, ebx
mov edx, 1
shl edx, cl
cmp eax, edx
jl 0x46b505
mov ecx, ebx
mov eax, 1
shl eax, cl
dec eax
jmp 0x46b505
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x60]
shl eax, 7
shl edx, 8
sub eax, ecx
mov ecx, edx
cdq
idiv ecx
test ebx, ebx
jle 0x46b503
mov ecx, ebx
mov edx, 1
shl edx, cl
cmp eax, edx
jl 0x46b503
mov ecx, ebx
mov eax, 1
shl eax, cl
dec eax
neg eax
mov word [esp + 0x9c], ax
mov edx, dword [esp + 0x38]
push edx
mov eax, dword [esp + 0x40]
push eax
lea ecx, [esp + 0xa0]
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 8]
call dword [esp + 0x4c]
mov edx, dword [esp + 0x74]
mov dword [esp + 0x70], edx
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x74], ecx
mov esi, dword [esp + 0x7c]
mov eax, dword [esp + 0x80]
mov dword [esp + 0x7c], eax
jl 0x46b4d5
xchg esp, eax
and al, 0x88
add byte [eax], al
add byte [ecx + 0x842494], cl
add byte [eax], al
mov ecx, dword [esp + 0x8c]
mov dword [esp + 0x88], ecx
add dword [esp + 0x2c], 0x80
add dword [esp + 0x30], 0x80
add dword [esp + 0x34], 0x80
mov eax, dword [esp + 0x40]
mov edx, dword [eax + 0x24]
add dword [esp + 0x3c], edx
inc dword [esp + 0x10]
mov ecx, dword [esp + 0x10]
cmp ecx, dword [esp + 0x14]
jbe 0x46b17c
mov eax, dword [esp + 0x40]
mov edx, dword [eax + 0x24]
shl edx, 2
add dword [esp + 0x38], edx
inc dword [esp + 0x1c]
add dword [esp + 0x94], 4
mov ecx, dword [esp + 0x1c]
cmp ecx, dword [esp + 0x20]
jl 0x46b0b6
inc dword [esp + 0x18]
add dword [esp + 0x40], 0x54
mov eax, dword [esp]
mov edx, dword [eax + 0x20]
cmp edx, dword [esp + 0x18]
jg 0x46af0a
mov ecx, dword [esp]
inc dword [ecx + 0x98]
mov eax, dword [ecx + 0x98]
mov edx, dword [esp]
cmp eax, dword [edx + 0x138]
jae 0x46b5fc
mov eax, 3
jmp 0x46b601
mov eax, 4
add esp, 0x118
pop esi
pop ebx
ret