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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5c
push ebx
xor ebx, ebx
mov dword [esp + 0x30], ecx
cmp dword [ebp + 0xc], ebx
mov eax, edx
push esi
setne bl
mov dword [esp + 0x20], eax
push edi
mov edi, dword [ecx]
xor esi, esi
mov ecx, dword [ebp + 8]
mov dword [esp + 0x44], ebx
mov dl, byte [ebx + ecx + 0x19]
mov byte [esp + 0xf], dl
cmp dl, 7
jne 0x1003e20e
mov eax, dword [edi + 0x20]
and eax, 0x80000
or eax, esi
jne 0x1003e25d
mov eax, dword [esp + 0x24]
mov ebx, dword [ecx + ebx*4 + 0x1c]
test dl, dl
je 0x1003e725
test ebx, ebx
jne 0x1003e725
mov ebx, dword [esp + 0x38]
lea edx, [esp + 0x28]
push edx
lea edx, [esp + 0x34]
mov dword [esp + 0x34], esi
push edx
push ecx
mov edx, eax
mov dword [esp + 0x34], esi
mov ecx, ebx
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x24], esi
call fcn.1003d162
add esp, 0xc
test eax, eax
je 0x1003e264
xor eax, eax
jmp 0x1003e727
mov eax, dword [ebp + 8]
mov ecx, esi
mov dword [esp + 0x34], esi
cmp dword [eax + 0x14], esi
jle 0x1003e515
push 3
pop edx
mov dword [esp + 0x50], 0x1007ae1c
mov dword [esp + 0x54], edx
mov dword [esp + 0x58], 0x1007ae18
mov dword [esp + 0x5c], edx
mov edx, dword [esp + 0x28]
test edx, edx
je 0x1003e2a2
mov eax, dword [edx + ecx*4]
mov dword [esp + 0x1c], eax
jmp 0x1003e2a9
mov edx, dword [eax + 0x24]
mov dword [esp + 0x1c], edx
mov eax, dword [esp + 0x30]
test eax, eax
je 0x1003e2be
mov eax, dword [eax + 4]
movzx ecx, word [eax + ecx*2]
mov eax, dword [esp + 0x24]
jmp 0x1003e2c6
mov eax, dword [esp + 0x24]
movzx ecx, word [eax + 0x28]
mov eax, dword [eax + 4]
movsx ecx, cx
add ecx, ecx
mov ecx, dword [eax + ecx*8]
mov dword [esp + 0x48], ecx
call fcn.10007e26
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x4c], eax
mov eax, dword [ebp + 8]
shl ecx, 4
mov dword [esp + 0x1c], ecx
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov ecx, dword [ecx + eax]
mov dword [esp + 0x60], ecx
call fcn.10007e26
mov dword [esp + 0x64], eax
mov ecx, edi
push esi
lea eax, [esp + 0x64]
push eax
push 0x3b
pop edx
call fcn.1002c95f
pop ecx
pop ecx
push eax
push ecx
push esi
lea eax, [esp + 0x54]
mov ecx, edi
push eax
push 0x3b
pop edx
call fcn.1002c95f
add esp, 0xc
mov ecx, edi
push eax
push esi
lea eax, [esp + 0x5c]
push eax
push 0x3b
pop edx
call fcn.1002c95f
pop ecx
pop ecx
push eax
mov edx, 0x89
mov ecx, ebx
call fcn.1002cae1
pop ecx
pop ecx
push eax
push 0x35
pop edx
mov ecx, ebx
call fcn.1002cae1
pop ecx
pop ecx
mov ecx, dword [esp + 0x10]
mov edx, eax
mov eax, dword [ebx]
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], eax
test ecx, ecx
jne 0x1003e371
mov dword [esp + 0x10], edx
jmp 0x1003e3ce
test edx, edx
je 0x1003e3ce
mov eax, dword [ecx + 4]
and eax, 0x20000001
cmp eax, 0x20000000
je 0x1003e3a2
mov eax, dword [edx + 4]
and eax, 0x20000001
cmp eax, 0x20000000
je 0x1003e3a2
push edx
push ecx
push 0x2c
pop edx
mov ecx, ebx
call fcn.1002cae1
pop ecx
jmp 0x1003e3c9
mov edx, ecx
mov ecx, ebx
call fcn.1002ce69
mov edx, dword [esp + 0x3c]
mov ecx, ebx
call fcn.1002ce69
mov ecx, dword [esp + 0x40]
mov edx, 0x96
push 0x1007b270
call fcn.1002ca57
mov dword [esp + 0x14], eax
pop ecx
cmp dword [ebp + 0xc], esi
je 0x1003e462
push esi
lea eax, [esp + 0x4c]
mov ecx, edi
push eax
push 0x3b
pop edx
call fcn.1002c95f
pop ecx
pop ecx
push eax
push ecx
push esi
lea eax, [esp + 0x64]
mov ecx, edi
push eax
push 0x3b
pop edx
call fcn.1002c95f
add esp, 0xc
mov edx, 0x89
mov ecx, ebx
push eax
call fcn.1002cae1
pop ecx
pop ecx
push eax
push ecx
push esi
lea eax, [esp + 0x54]
mov ecx, edi
push eax
push 0x3b
pop edx
call fcn.1002c95f
add esp, 0xc
mov ecx, edi
push eax
push esi
lea eax, [esp + 0x5c]
push eax
push 0x3b
pop edx
call fcn.1002c95f
pop ecx
pop ecx
push eax
mov edx, 0x89
mov ecx, ebx
call fcn.1002cae1
pop ecx
pop ecx
push eax
push 0x2d
pop edx
mov ecx, ebx
call fcn.1002cae1
mov edx, dword [esp + 0x20]
mov ecx, ebx
push eax
call fcn.1002cb8a
add esp, 0xc
mov dword [esp + 0x18], eax
mov al, byte [esp + 0xf]
cmp al, 7
je 0x1003e500
cmp al, 0xa
jne 0x1003e4b1
cmp dword [ebp + 0xc], esi
je 0x1003e500
push esi
lea eax, [esp + 0x4c]
mov ecx, edi
push eax
push 0x3b
pop edx
call fcn.1002c95f
pop ecx
pop ecx
push eax
push ecx
push esi
lea eax, [esp + 0x64]
mov ecx, edi
push eax
push 0x3b
pop edx
call fcn.1002c95f
add esp, 0xc
mov edx, 0x89
mov ecx, ebx
push eax
call fcn.1002cae1
jmp 0x1003e4dc
mov ecx, edi
push esi
push esi
cmp al, 9
jne 0x1003e4d4
mov eax, dword [ebp + 8]
mov edx, dword [esp + 0x24]
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov edx, dword [eax + edx + 4]
test edx, edx
je 0x1003e4d4
call fcn.1002cf3c
jmp 0x1003e4dc
push 0x75
pop edx
call fcn.1002c95f
mov edx, dword [esp + 0x28]
pop ecx
pop ecx
push eax
mov ecx, ebx
call fcn.1002d737
pop ecx
lea ecx, [esp + 0x60]
mov dword [esp + 0x20], eax
push esi
push ecx
mov edx, eax
mov ecx, ebx
call fcn.1002d909
pop ecx
pop ecx
mov ecx, dword [esp + 0x34]
mov eax, dword [ebp + 8]
inc ecx
mov dword [esp + 0x34], ecx
cmp ecx, dword [eax + 0x14]
jl 0x1003e291
mov eax, dword [esp + 0x28]
test eax, eax
je 0x1003e526
mov edx, eax
mov ecx, edi
call fcn.1000590f
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov eax, dword [eax]
mov ecx, eax
mov dword [esp + 0x30], eax
call fcn.10007e26
cmp byte [esp + 0xf], 7
mov ecx, eax
mov dword [esp + 0x34], ecx
jne 0x1003e5ae
mov eax, dword [esp + 0x30]
push str.FOREIGN_KEY_constraint_failed
mov dword [esp + 0x68], ecx
mov ecx, edi
push 0x47
pop edx
mov dword [esp + 0x64], eax
call fcn.1002ca57
mov dword [esp + 0x44], eax
pop ecx
test eax, eax
je 0x1003e56d
mov byte [eax + 1], 2
push esi
push esi
push esi
push esi
push esi
push dword [esp + 0x24]
lea eax, [esp + 0x78]
xor edx, edx
push esi
push eax
mov ecx, ebx
call fcn.10039148
pop ecx
pop ecx
push eax
push dword [esp + 0x5c]
xor edx, edx
mov ecx, ebx
call fcn.1002d737
pop ecx
mov edx, eax
mov ecx, ebx
call fcn.10045424
mov ecx, dword [esp + 0x50]
add esp, 0x1c
mov dword [esp + 0x2c], eax
mov dword [esp + 0x10], esi
inc dword [edi + 0x118]
lea eax, [ecx + 0x51]
push esi
push eax
mov ecx, edi
call fcn.10005af6
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x1003e66f
push dword [esp + 0x34]
lea eax, [ebx + 0x24]
push dword [esp + 0x34]
lea ecx, [eax + 0x2c]
mov dword [esp + 0x1c], eax
push ecx
mov dword [ebx + 0x1c], eax
mov dword [eax + 0xc], ecx
call fcn.10065820
mov eax, dword [esp + 0x1c]
add esp, 0xc
test eax, eax
je 0x1003e607
push esi
push 1
mov edx, eax
mov ecx, edi
call fcn.1002cf3c
pop ecx
pop ecx
mov ecx, eax
jmp 0x1003e609
mov ecx, esi
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
push 1
mov dword [eax + 0x10], ecx
mov ecx, edi
call fcn.1002d230
mov edx, dword [esp + 0x30]
pop ecx
mov ecx, dword [esp + 0x14]
push 1
mov dword [ecx + 0x14], eax
mov ecx, edi
call fcn.1002d56b
pop ecx
mov ecx, dword [esp + 0x14]
mov dword [ecx + 8], eax
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x1003e66f
push esi
push ecx
mov ecx, dword [esp + 0x40]
push 0x13
pop edx
call fcn.1002cae1
pop ecx
pop ecx
mov ecx, eax
mov dword [esp + 0x18], ecx
test ecx, ecx
je 0x1003e66c
push esi
mov edx, ecx
mov ecx, edi
push 1
call fcn.1002cf3c
pop ecx
pop ecx
mov esi, eax
mov dword [ebx + 0xc], esi
dec dword [edi + 0x118]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1003e686
mov edx, eax
mov ecx, edi
call fcn.1002cdc8
mov eax, dword [esp + 0x18]
test eax, eax
je 0x1003e697
mov edx, eax
mov ecx, edi
call fcn.1002cdc8
mov eax, dword [esp + 0x20]
test eax, eax
je 0x1003e6a8
mov edx, eax
mov ecx, edi
call fcn.1002d95f
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x1003e6bc
push 1
mov edx, eax
mov ecx, edi
call fcn.1004536d
pop ecx
cmp byte [edi + 0x51], 1
jne 0x1003e6d0
mov edx, ebx
mov ecx, edi
call fcn.1003d9fd
jmp 0x1003e25d
mov al, byte [esp + 0xf]
cmp al, 7
je 0x1003e6f4
cmp al, 0xa
jne 0x1003e6eb
cmp dword [ebp + 0xc], 0
jne 0x1003e6eb
mov ecx, dword [esp + 0x14]
mov byte [ecx], 0x7c
jmp 0x1003e6fb
mov ecx, dword [esp + 0x14]
mov byte [ecx], 0x7d
jmp 0x1003e6fb
mov ecx, dword [esp + 0x14]
mov byte [ecx], 0x86
cmp dword [ebp + 0xc], 0
mov dword [ecx + 4], ebx
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx + 0x48]
mov dword [ebx + 0x14], eax
mov eax, dword [ecx + 0x48]
mov ecx, dword [esp + 0x44]
mov dword [ebx + 0x18], eax
mov eax, dword [ebp + 8]
mov dword [eax + ecx*4 + 0x1c], ebx
setne al
add al, 0x7c
mov byte [ebx + 8], al
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret