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

Disassembly:
sub esp, 0x148
push ebx
push ebp
push esi
mov esi, dword [esp + 0x168]
xor ebx, ebx
push edi
mov ebp, dword [esi + 8]
cmp word [esi + 4], 0xffff
mov byte [esp + 0x12], 0
mov dword [esp + 0x28], ebx
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], ebx
jne 0x46f19f
mov eax, dword [esp + 0x174]
push esi
push eax
call fcn.00470320
add esp, 8
mov ax, word [esi + 4]
cmp ax, 0xffff
je 0x46f5c4
cmp word [esi + 6], bx
je 0x46f5c4
mov edx, dword [esp + 0x174]
movsx eax, ax
lea ecx, [eax + eax*2]
mov edi, dword [edx + ecx*4 + 8]
lea eax, [edx + ecx*4]
cmp edi, 1
mov dword [esp + 0x18], eax
sete cl
test cl, cl
mov byte [esp + 0x13], cl
jne 0x46f249
mov edi, dword [eax]
cmp dword [edi + 0x14], ebx
jne 0x46f1ef
mov eax, dword [edi + 0x18]
mov byte [esp + 0x12], cl
cmp eax, ebx
je 0x46f1f4
mov byte [esp + 0x12], 1
mov ebx, dword [esp + 0x170]
mov ebp, dword [esp + 0x15c]
lea eax, [esp + 0x98]
push eax
push 0x4000
push ebx
push ebp
call sub.XLIB.dll_Ordinal_195
mov eax, dword [edi + 4]
mov ecx, dword [esp + 0xe4]
add esp, 0x10
cmp ecx, eax
mov dword [esp + 0x78], eax
je 0x46f243
mov dword [esp + 0x28], ecx
lea ecx, [esp + 0x3c]
push ecx
push 0x4000
push ebx
push ebp
call sub.XLIB.dll_Ordinal_190
add esp, 0x10
mov ebp, dword [esp + 0x20]
jmp 0x46f250
mov ebx, dword [esp + 0x170]
cmp byte [esi + 0xc], 1
jne 0x46f34a
mov ax, word [esi + 6]
lea edi, [esp + 0xf4]
cmp ax, 0x64
jle 0x46f27d
movsx edx, ax
push edx
call sub.HCLXT.dll_Ordinal_127
add esp, 4
mov dword [esp + 0x24], eax
mov edi, eax
mov al, byte [esp + 0x13]
mov dword [esi + 8], edi
test al, al
je 0x46f2f2
movsx eax, word [esi + 6]
add edi, eax
mov dword [esp + 0x14], 0
test eax, eax
mov ebx, ebp
jle 0x46f343
mov eax, dword [sym.imp.MSVCR80.dll___mb_cur_max]
mov ecx, dword [eax]
push ecx
push ebx
call dword [sym.imp.MSVCR80.dll_mblen]
add esp, 8
cmp eax, 1
jl 0x46f5c4
sub edi, eax
test eax, eax
jle 0x46f2dc
mov ebp, ebx
mov ecx, edi
sub ebp, edi
mov dword [esp + 0x1c], eax
mov dl, byte [ecx + ebp]
mov byte [ecx], dl
mov edx, dword [esp + 0x1c]
inc ecx
dec edx
mov dword [esp + 0x1c], edx
jne 0x46f2cb
mov ecx, dword [esp + 0x14]
add ebx, eax
add ecx, eax
movsx eax, word [esi + 6]
cmp ecx, eax
mov dword [esp + 0x14], ecx
jl 0x46f2a0
jmp 0x46f343
mov al, byte [esp + 0x12]
test al, al
jne 0x46f319
movsx edx, word [esi + 6]
xor ecx, ecx
test edx, edx
lea eax, [edx + ebp - 1]
jle 0x46f34a
mov dl, byte [eax]
mov byte [edi], dl
inc edi
movsx edx, word [esi + 6]
dec eax
inc ecx
cmp ecx, edx
jl 0x46f308
jmp 0x46f34a
movsx edx, word [esi + 6]
xor ecx, ecx
test edx, 0xfffffffe
lea eax, [edx + ebp - 1]
jle 0x46f34a
mov dl, byte [eax]
mov bl, byte [eax - 1]
dec eax
mov byte [edi], bl
inc edi
dec eax
mov byte [edi], dl
inc edi
movsx edx, word [esi + 6]
inc ecx
sar edx, 1
cmp ecx, edx
jl 0x46f32b
mov ebx, dword [esp + 0x170]
mov edi, dword [esp + 0x17c]
mov ebp, dword [esp + 0x164]
test edi, edi
je 0x46f43c
mov ebx, dword [esp + 0x180]
mov ecx, dword [esp + 0x184]
mov ax, word [ebx]
cmp ax, word [ecx]
jne 0x46f435
mov eax, dword [edi]
test al, 1
je 0x46f404
mov edx, dword [0x564724]
mov ecx, eax
shr ecx, 4
and ecx, 0xf
mov dword [esp + 0x14], 0xffffffff
test al, 2
lea ecx, [edx + ecx*4]
mov edx, dword [ecx]
mov dword [esp + 0x2c], edx
je 0x46f3c6
lea eax, [esp + 0x1c]
lea edx, [esp + 0x14]
push eax
mov eax, dword [ecx]
mov ecx, dword [esp + 0x178]
push edx
push 1
push eax
push ecx
call fcn.0046dd30
add esp, 0x14
mov eax, dword [edi]
mov dx, word [esp + 0x14]
xor ecx, ecx
mov word [esp + 0x30], dx
mov cl, ah
lea edx, [edi + 6]
shr eax, 2
mov word [esp + 0x32], cx
mov ecx, dword [esp + 0x184]
and al, 3
push ecx
mov byte [esp + 0x3c], al
mov ax, word [edi + 4]
mov dword [esp + 0x38], edx
push ebx
mov word [esp + 0x42], ax
push ebp
lea edx, [esp + 0x38]
jmp 0x46f41a
mov edi, dword [edi + 4]
test eax, 0xfffe
jbe 0x46f435
cmp word [edi], 0
jle 0x46f435
mov edx, dword [edi + 4]
push ecx
push ebx
push ebp
mov bl, byte [esp + 0x1e]
mov eax, dword [esp + 0x24]
xor ecx, ecx
push edx
test bl, bl
push esi
push eax
sete cl
push ecx
call fcn.0046f5d0
add esp, 0x1c
mov ebx, dword [esp + 0x170]
mov al, byte [esp + 0x178]
test al, al
mov al, byte [esp + 0x12]
je 0x46f4ee
test al, al
je 0x46f482
movsx edx, word [esi + 6]
mov eax, dword [esi + 8]
mov ecx, dword [esp + 0x168]
sar edx, 1
push edx
mov edx, dword [esp + 0x164]
push eax
mov eax, dword [esp + 0x164]
push ecx
push ebp
push ebx
push edx
push eax
call sub.XLIB.dll_Ordinal_421
jmp 0x46f582
mov al, byte [esp + 0x13]
test al, al
je 0x46f4c1
movsx ecx, word [esi + 6]
mov edx, dword [esi + 8]
mov eax, dword [esp + 0x168]
push ecx
mov ecx, dword [esp + 0x1c]
push edx
push eax
mov edx, dword [ecx]
mov eax, dword [esp + 0x16c]
mov ecx, dword [esp + 0x168]
push ebp
push ebx
push edx
push eax
push ecx
call sub.XLIB.dll_Ordinal_990
add esp, 0x20
jmp 0x46f585
movsx edx, word [esi + 6]
mov eax, dword [esi + 8]
mov ecx, dword [esp + 0x168]
push edx
mov edx, dword [esp + 0x164]
push eax
mov eax, dword [esp + 0x164]
push ecx
push ebp
push ebx
push edx
push eax
call sub.XLIB.dll_Ordinal_420
jmp 0x46f582
test al, al
je 0x46f51e
movsx ecx, word [esi + 6]
mov edx, dword [esi + 8]
mov eax, dword [esp + 0x168]
sar ecx, 1
push ecx
mov ecx, dword [esp + 0x164]
push edx
mov edx, dword [esp + 0x164]
push eax
push ebp
push ebx
push ecx
push edx
call sub.XLIB.dll_Ordinal_423
jmp 0x46f582
mov al, byte [esp + 0x13]
test al, al
je 0x46f55a
movsx eax, word [esi + 6]
mov ecx, dword [esi + 8]
mov edx, dword [esp + 0x168]
push eax
mov eax, dword [esp + 0x1c]
push ecx
push edx
mov ecx, dword [eax]
mov edx, dword [esp + 0x16c]
mov eax, dword [esp + 0x168]
push ebp
push ebx
push ecx
push edx
push eax
call sub.XLIB.dll_Ordinal_991
add esp, 0x20
jmp 0x46f585
movsx ecx, word [esi + 6]
mov edx, dword [esi + 8]
mov eax, dword [esp + 0x168]
push ecx
mov ecx, dword [esp + 0x164]
push edx
mov edx, dword [esp + 0x164]
push eax
push ebp
push ebx
push ecx
push edx
call sub.XLIB.dll_Ordinal_422
add esp, 0x1c
mov eax, dword [esp + 0x28]
test eax, eax
je 0x46f5ac
mov ecx, dword [esp + 0x15c]
mov dword [esp + 0x78], eax
lea eax, [esp + 0x3c]
push eax
push 0x4000
push ebx
push ecx
call sub.XLIB.dll_Ordinal_190
add esp, 0x10
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
test eax, eax
mov dword [esi + 8], edx
je 0x46f5c4
push eax
call sub.HCLXT.dll_Ordinal_126
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x148
ret