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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5c
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [eax]
xor ecx, ecx
xor eax, eax
cmp dword [ebp + 0x14], eax
push esi
mov esi, dword [ebp + 0x10]
setne cl
push edi
mov dword [esp + 0x24], ebx
mov edi, ecx
movzx edx, byte [edi + esi + 0x19]
cmp edx, 7
mov dword [esp + 0x44], edi
mov dword [esp + 0x30], edx
jne 0x46e898
mov eax, dword [ebx + 0x20]
and eax, 0x80000
xor ecx, ecx
or eax, ecx
jne 0x46edde
cmp edx, eax
mov edi, dword [esi + edi*4 + 0x1c]
je 0x46ee3e
cmp edi, eax
jne 0x46ee3e
mov ecx, dword [ebp + 8]
lea edx, [esp + 0x34]
push edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xc]
push esi
push eax
push ecx
lea eax, [esp + 0x38]
call fcn.0046c990
add esp, 0x10
test eax, eax
jne 0x46edde
cmp dword [esi + 0x14], eax
mov dword [esp + 0x18], eax
jle 0x46eb90
mov eax, 3
mov dword [esp + 0x50], 0x4c7dc4
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], 0x4c7dc0
mov dword [esp + 0x5c], eax
mov edi, esi
jmp 0x46e91a
mov edi, ecx
mov eax, dword [esp + 0x28]
test eax, eax
mov ecx, dword [ebp + 0xc]
je 0x46e92e
mov edx, dword [esp + 0x18]
mov edx, dword [eax + edx*4]
jmp 0x46e931
mov edx, dword [edi + 0x24]
mov eax, dword [esp + 0x34]
test eax, eax
je 0x46e946
mov eax, dword [eax + 4]
mov esi, dword [esp + 0x18]
movsx eax, word [eax + esi*2]
jmp 0x46e94a
movsx eax, word [ecx + 0x20]
mov ecx, dword [ecx + 4]
shl eax, 4
mov eax, dword [eax + ecx]
test eax, eax
mov dword [esp + 0x48], eax
je 0x46e970
lea esi, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x46e960
sub eax, esi
and eax, 0x3fffffff
shl edx, 4
mov dword [esp + 0x4c], eax
mov eax, edx
mov edx, dword [edi]
mov ecx, dword [edx + 4]
mov dword [esp + 0x40], eax
mov eax, dword [eax + ecx]
test eax, eax
mov dword [esp + 0x60], eax
je 0x46e9a0
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x46e990
sub eax, edx
and eax, 0x3fffffff
push 0
push ebx
lea edi, [esp + 0x68]
mov ebx, 0x3b
mov dword [esp + 0x6c], eax
call fcn.004524e0
mov esi, dword [esp + 0x2c]
push 0
push esi
lea edi, [esp + 0x58]
mov dword [esp + 0x4c], eax
call fcn.004524e0
push 0
push esi
lea edi, [esp + 0x68]
mov dword [esp + 0x50], eax
call fcn.004524e0
mov edi, dword [ebp + 8]
mov ecx, eax
mov eax, dword [esp + 0x50]
push 0x8d
push edi
call fcn.00452690
mov ecx, eax
mov eax, dword [esp + 0x5c]
push 0x35
push edi
call fcn.00452690
mov ecx, dword [esp + 0x38]
push eax
mov eax, edi
call fcn.00452860
add esp, 0x2c
cmp dword [ebp + 0x14], 0
mov dword [esp + 0x10], eax
je 0x46ea9d
push 0
push esi
lea edi, [esp + 0x50]
call fcn.004524e0
push 0
push esi
lea edi, [esp + 0x68]
mov dword [esp + 0x4c], eax
call fcn.004524e0
mov edx, dword [ebp + 8]
mov ecx, eax
mov eax, dword [esp + 0x4c]
push 0x8d
push edx
call fcn.00452690
push 0
push esi
lea edi, [esp + 0x68]
mov dword [esp + 0x58], eax
call fcn.004524e0
push 0
push esi
lea edi, [esp + 0x78]
mov dword [esp + 0x64], eax
call fcn.004524e0
mov edi, dword [ebp + 8]
mov ecx, eax
mov eax, dword [esp + 0x64]
push 0x8d
push edi
call fcn.00452690
mov ecx, eax
mov eax, dword [esp + 0x68]
push 0x2d
push edi
call fcn.00452690
mov ecx, dword [esp + 0x4c]
push eax
mov eax, edi
call fcn.00452860
add esp, 0x3c
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x30]
cmp eax, 7
je 0x46eb75
cmp eax, 0xa
jne 0x46eaf1
cmp dword [ebp + 0x14], 0
je 0x46eb75
push 0
push esi
lea edi, [esp + 0x50]
lea ebx, [eax + 0x31]
call fcn.004524e0
push 0
push esi
lea edi, [esp + 0x68]
mov dword [esp + 0x4c], eax
call fcn.004524e0
mov ecx, eax
mov eax, dword [ebp + 8]
push 0x8d
push eax
mov eax, dword [esp + 0x54]
call fcn.00452690
add esp, 0x18
jmp 0x46eb4f
cmp eax, 9
jne 0x46eb1c
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx]
mov ecx, dword [eax + 4]
add ecx, dword [esp + 0x40]
test byte [ecx + 0xe], 0x60
jne 0x46eb1c
call fcn.00460a30
test eax, eax
je 0x46eb1c
xor ecx, ecx
mov edx, esi
call fcn.00453120
jmp 0x46eb4f
push 0
push 0x34
mov ecx, esi
call fcn.00419650
mov esi, eax
add esp, 8
test esi, esi
je 0x46eb4d
push 0x34
push 0
push esi
call sub.ntdll.dll_memset
mov dword [esi + 0x18], 1
mov word [esi + 0x22], 0xffff
add esp, 0xc
mov byte [esi], 0x79
mov eax, esi
mov esi, dword [ebp + 8]
mov ecx, eax
mov eax, dword [esp + 0x1c]
mov edx, esi
call fcn.00453880
push 0
lea edx, [esp + 0x64]
push edx
push esi
mov ecx, eax
mov dword [esp + 0x28], eax
call fcn.00453a70
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 0x10]
mov ebx, dword [esp + 0x24]
add eax, 1
cmp eax, dword [ecx + 0x14]
mov dword [esp + 0x18], eax
jl 0x46e918
mov eax, dword [esp + 0x28]
test eax, eax
je 0x46eb9f
mov ecx, ebx
call fcn.00419270
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov edi, dword [eax]
test edi, edi
mov dword [esp + 0x40], edi
jne 0x46ebb6
xor esi, esi
mov dword [esp + 0x28], esi
jmp 0x46ebd6
mov eax, edi
lea edx, [eax + 1]
jmp 0x46ebc0
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x46ebc0
sub eax, edx
and eax, 0x3fffffff
mov esi, eax
mov dword [esp + 0x28], eax
cmp dword [esp + 0x30], 7
jne 0x46eca3
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x3c]
test edx, edx
mov eax, 0xffff8000
je 0x46ec0a
mov ecx, dword [ebx + 0x10]
xor eax, eax
cmp dword [ecx + 0xc], edx
je 0x46ec0a
add ecx, 0xc
lea ecx, [ecx]
add ecx, 0x10
add eax, 1
cmp dword [ecx], edx
jne 0x46ec00
mov edx, dword [ebx + 0x10]
shl eax, 4
mov eax, dword [eax + edx]
test eax, eax
mov dword [esp + 0x60], edi
mov dword [esp + 0x64], esi
mov dword [esp + 0x58], eax
je 0x46ec36
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x46ec26
sub eax, edx
and eax, 0x3fffffff
mov dword [esp + 0x5c], eax
push 0x47
push ebx
mov eax, str.FOREIGN_KEY_constraint_failed
call fcn.004525d0
add esp, 8
test eax, eax
je 0x46ec52
mov byte [eax + 1], 2
mov esi, eax
mov eax, dword [ebp + 8]
mov edi, dword [eax]
call fcn.004537a0
mov ecx, dword [esp + 0x10]
mov edi, dword [ebp + 8]
push 0
push 0
push 0
push 0
push 0
push ecx
mov esi, eax
lea edx, [esp + 0x78]
push edx
lea eax, [esp + 0x74]
push eax
xor ecx, ecx
mov eax, edi
call fcn.004661b0
add esp, 8
push eax
push esi
push edi
call fcn.0047a5f0
mov esi, dword [esp + 0x4c]
add esp, 0x24
mov dword [esp + 0x2c], eax
mov dword [esp + 0x10], 0
add dword [ebx + 0x130], 1
add esi, 0x55
push 0
push esi
mov ecx, ebx
mov word [ebx + 0x134], 0
call fcn.00419570
mov edi, eax
add esp, 8
test edi, edi
je 0x46ed6e
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x40]
lea esi, [edi + 0x24]
push ecx
lea eax, [esi + 0x30]
push edx
mov dword [edi + 0x1c], esi
push eax
mov dword [esp + 0x2c], esi
mov dword [esi + 0xc], eax
call sub.ntdll.dll_memcpy
add esp, 0xc
cmp dword [esp + 0x10], 0
je 0x46ed0b
mov eax, dword [esp + 0x10]
push 0
push 1
push eax
push ebx
call fcn.00452d30
add esp, 0x10
jmp 0x46ed0d
xor eax, eax
mov ecx, dword [esp + 0x1c]
push 1
push ecx
push ebx
mov dword [esi + 0x14], eax
call fcn.00453150
mov edx, dword [esp + 0x38]
add esp, 0xc
push 1
push edx
push ebx
mov dword [esi + 0x18], eax
call fcn.004534f0
add esp, 0xc
cmp dword [esp + 0x14], 0
mov dword [esi + 8], eax
je 0x46ed6e
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x14]
push 0x13
push eax
xor eax, eax
call fcn.00452690
add esp, 8
test eax, eax
mov dword [esp + 0x14], eax
je 0x46ed69
push 0
push 1
push eax
push ebx
call fcn.00452d30
add esp, 0x10
jmp 0x46ed6b
xor eax, eax
mov dword [edi + 0xc], eax
add dword [ebx + 0x130], 0xffffffff
je 0x46ed7b
xor eax, eax
jmp 0x46ed82
movzx eax, word [ebx + 0x136]
mov word [ebx + 0x134], ax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x46ed9b
push eax
push ebx
call fcn.00452b80
add esp, 8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x46edad
push eax
push ebx
call fcn.00452b80
add esp, 8
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x46edbf
push eax
push ebx
call fcn.00453b70
add esp, 8
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x46edd3
push 1
push eax
push ebx
call fcn.0047a490
add esp, 0xc
cmp byte [ebx + 0x57], 1
jne 0x46ede7
call fcn.0046dc20
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x30]
cmp eax, 7
je 0x46ee0d
cmp eax, 0xa
jne 0x46ee04
cmp dword [ebp + 0x14], 0
jne 0x46ee04
mov eax, dword [esp + 0x20]
mov byte [eax], 0x80
jmp 0x46ee14
mov eax, dword [esp + 0x20]
mov byte [eax], 0x81
jmp 0x46ee14
mov eax, dword [esp + 0x20]
mov byte [eax], 0x8a
cmp dword [ebp + 0x14], 0
mov dword [eax + 4], edi
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x3c]
mov dword [edi + 0x14], ecx
mov edx, dword [eax + 0x3c]
mov eax, dword [esp + 0x44]
mov ecx, dword [ebp + 0x10]
mov dword [edi + 0x18], edx
setne dl
add dl, 0x80
mov dword [ecx + eax*4 + 0x1c], edi
mov byte [edi + 8], dl
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret