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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
mov esi, ecx
push edi
mov edi, edx
mov dword [ebp - 0xc], esi
mov edx, dword [ebp + 8]
cmp byte [esi + 0x49], 1
mov dword [ebp - 0x24], edi
jne 0x1001a6a6
mov bl, byte [esi + 0x48]
test bl, 2
je 0x1001a6a6
mov eax, dword [esi + 0x78]
cmp byte [eax + 2], 0
je 0x1001a6a6
mov ecx, dword [esi + 0x18]
mov eax, dword [esi + 0x1c]
cmp ecx, edx
jne 0x1001a68e
cmp eax, dword [ebp + 0xc]
jne 0x1001a68e
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test bl, 8
je 0x1001a6a6
cmp eax, dword [ebp + 0xc]
jl 0x1001a73b
jg 0x1001a6a6
cmp ecx, edx
jb 0x1001a73b
test edi, edi
je 0x1001a720
mov esi, dword [edi]
movzx ecx, word [esi + 8]
movzx eax, word [esi + 6]
add ecx, eax
cmp ecx, 0xd
ja 0x1001a710
mov eax, dword [edi + 8]
xor edx, edx
movzx ebx, word [eax + 8]
mov eax, dword [esi + 0x10]
mov cl, byte [eax]
test cl, cl
sete dl
xor eax, eax
test cl, cl
setne al
lea edx, [edx*2 - 1]
lea eax, [eax*2 - 1]
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], edx
test bl, 4
je 0x1001a6fe
mov esi, dword [ebp - 0xc]
mov dword [ebp - 0x10], 0x100263d0
mov byte [edi + 7], 0
jmp 0x1001a727
test bl, 0x19
jne 0x1001a710
cmp dword [esi + 0x14], 0
mov dword [ebp - 0x10], 0x10026620
je 0x1001a717
mov dword [ebp - 0x10], 0x100263b0
mov esi, dword [ebp - 0xc]
mov byte [edi + 7], 0
jmp 0x1001a727
mov dword [ebp - 0x10], 0
mov ecx, esi
call fcn.1001a340
test eax, eax
jne 0x1001aad8
cmp byte [esi + 0x49], al
jne 0x1001a74d
mov eax, dword [ebp + 0x14]
mov dword [eax], 0xffffffff
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 1
sub eax, dword [ebp + 0x10]
mov dword [ebp - 0x2c], eax
nop dword [eax + eax]
movsx eax, word [esi + 0x4c]
xor ecx, ecx
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0x2c]
mov edx, dword [esi + eax*4 + 0x78]
mov dword [ebp - 0x14], edx
movzx ebx, word [edx + 0x12]
dec ebx
mov edi, ebx
mov dword [ebp - 0x28], ebx
sar edi, cl
lea ecx, [edx + 0x14]
cmp dword [ebp - 0x10], 0
mov word [esi + eax*2 + 0x4e], di
lea eax, [edx + 0x40]
mov dword [ebp - 8], ecx
lea ecx, [edx + 0x38]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], ecx
jne 0x1001a8d1
mov cl, byte [edx + 3]
mov eax, dword [eax]
mov byte [ebp - 1], cl
movzx ecx, byte [edx + 7]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x28], ecx
movzx ecx, byte [eax + edi*2]
mov esi, dword [ebp - 8]
movzx eax, byte [eax + edi*2 + 1]
shl ecx, 8
or ecx, eax
movzx eax, word [esi]
mov esi, dword [ebp - 0xc]
and ecx, eax
mov eax, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x28]
add ecx, dword [eax]
cmp byte [ebp - 1], 0
je 0x1001a7f0
cmp byte [ecx], 0x80
jb 0x1001a7ef
mov eax, dword [edx + 0x3c]
inc ecx
cmp ecx, eax
jae 0x1001aa4a
cmp byte [ecx], 0x80
jae 0x1001a7e1
inc ecx
lea edx, [ebp - 0x38]
call fcn.10008a10
mov ecx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x38]
cmp ecx, dword [ebp + 0xc]
jg 0x1001a86c
jl 0x1001a80c
mov edx, dword [ebp + 8]
cmp eax, edx
jae 0x1001a86f
lea edx, [edi + 1]
mov dword [ebp - 0x20], edx
cmp edx, ebx
jle 0x1001a884
or esi, 0xffffffff
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x1c]
cmp byte [ecx + 5], 0
jne 0x1001aa7c
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 0x18]
movzx eax, word [ecx + 0x12]
cmp edx, eax
jl 0x1001a9ed
movzx ecx, byte [ecx + 6]
add ecx, dword [ebx]
movzx edx, byte [ecx + 8]
movzx eax, byte [ecx + 9]
shl edx, 8
or edx, eax
movzx eax, byte [ecx + 0xa]
shl edx, 8
or edx, eax
movzx eax, byte [ecx + 0xb]
jmp 0x1001aa20
mov edx, dword [ebp + 8]
cmp ecx, dword [ebp + 0xc]
jl 0x1001a89e
jg 0x1001a87a
cmp eax, edx
jbe 0x1001a89e
mov edx, dword [ebp - 0x20]
lea ebx, [edi - 1]
cmp edx, ebx
jg 0x1001a894
mov eax, dword [ebp - 0x30]
lea edi, [ebx + edx]
mov edx, dword [ebp - 0x14]
sar edi, 1
jmp 0x1001a7b2
mov esi, 1
jmp 0x1001a819
or byte [esi + 0x48], 2
mov dword [esi + 0x18], eax
movsx eax, word [esi + 0x4c]
mov dword [esi + 0x1c], ecx
mov ecx, dword [ebp - 0x14]
mov word [esi + eax*2 + 0x4e], di
cmp byte [ecx + 5], 0
jne 0x1001aa6f
mov eax, dword [ebp - 8]
mov edx, edi
mov ebx, dword [ebp - 0x1c]
mov dword [ebp - 0x20], edx
mov dword [ebp - 8], eax
jmp 0x1001a838
mov eax, dword [eax]
movzx ecx, byte [edx + 7]
mov dword [ebp - 0x30], ecx
movzx edx, byte [eax + edi*2]
movzx eax, byte [eax + edi*2 + 1]
shl edx, 8
or edx, eax
mov eax, dword [ebp - 8]
movzx eax, word [eax]
and edx, eax
mov eax, dword [ebp - 0x1c]
add edx, ecx
add edx, dword [eax]
mov eax, dword [ebp - 0x14]
movzx ecx, byte [edx]
lea esi, [edx + 1]
movzx eax, byte [eax + 8]
cmp ecx, eax
ja 0x1001a91a
push dword [ebp - 0x24]
push esi
push ecx
call dword [ebp - 0x10]
add esp, 0xc
mov esi, eax
jmp 0x1001a9ba
mov al, byte [esi]
test al, al
js 0x1001a948
and ecx, 0x7f
movzx eax, al
shl ecx, 7
add ecx, eax
mov eax, dword [ebp - 0x14]
movzx eax, word [eax + 0xa]
cmp ecx, eax
ja 0x1001a948
push dword [ebp - 0x24]
lea eax, [edx + 2]
push eax
push ecx
call dword [ebp - 0x10]
add esp, 0xc
mov esi, eax
jmp 0x1001a9ba
mov esi, dword [ebp - 0xc]
sub edx, dword [ebp - 0x30]
add esi, 0x18
mov ecx, dword [ebp - 0x14]
push esi
call fcn.10016750
mov esi, dword [esi]
add esp, 4
mov eax, esi
mov dword [ebp - 0x30], esi
cdq
push edx
push eax
call fcn.100049d0
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x1001aac4
mov eax, dword [ebp - 0xc]
xor edx, edx
push 2
push ebx
push esi
movsx ecx, word [eax + 0x4c]
mov word [eax + ecx*2 + 0x4e], di
mov ecx, eax
call fcn.10019de0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x1001aab9
push dword [ebp - 0x24]
push ebx
push dword [ebp - 0x30]
call dword [ebp - 0x10]
add esp, 0xc
mov esi, eax
push ebx
call fcn.10004df0
mov ebx, dword [ebp - 0x28]
add esp, 4
test esi, esi
jns 0x1001a9c6
lea edx, [edi + 1]
mov dword [ebp - 0x20], edx
jmp 0x1001a9d5
jle 0x1001aa91
mov edx, dword [ebp - 0x20]
lea ebx, [edi - 1]
mov dword [ebp - 0x28], ebx
cmp edx, ebx
jg 0x1001a825
mov eax, dword [ebp - 0x18]
lea edi, [ebx + edx]
mov edx, dword [ebp - 0x14]
sar edi, 1
jmp 0x1001a8d1
mov eax, dword [edi]
movzx ecx, byte [eax + edx*2]
movzx eax, byte [eax + edx*2 + 1]
shl ecx, 8
or ecx, eax
mov eax, dword [ebp - 8]
movzx eax, word [eax]
and ecx, eax
add ecx, dword [ebx]
movzx edx, byte [ecx]
movzx eax, byte [ecx + 1]
shl edx, 8
or edx, eax
movzx eax, byte [ecx + 2]
shl edx, 8
or edx, eax
movzx eax, byte [ecx + 3]
mov ecx, dword [ebp - 0x20]
shl edx, 8
or edx, eax
movsx eax, word [esi + 0x4c]
mov word [esi + eax*2 + 0x4e], cx
mov ecx, esi
call fcn.1001a2a0
mov esi, eax
test esi, esi
jne 0x1001aac9
mov esi, dword [ebp - 0xc]
jmp 0x1001a760
push 0x100f685c
push 0xde71
push str.database_corruption_at_line__d_of___.10s_
push 0xb
call fcn.10007150
add esp, 0x10
mov eax, 0xb
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x14]
xor esi, esi
mov dword [eax], 0
jmp 0x1001aac9
mov ecx, dword [ebp - 0xc]
movsx eax, word [ecx + 0x4c]
mov word [ecx + eax*2 + 0x4e], di
mov eax, dword [ebp + 0x14]
mov dword [eax], esi
xor esi, esi
jmp 0x1001aac9
mov eax, dword [ebp + 0x14]
xor esi, esi
mov ecx, dword [ebp - 0xc]
mov dword [eax], 0
movsx eax, word [ecx + 0x4c]
mov word [ecx + eax*2 + 0x4e], di
mov ecx, 0xb
mov eax, dword [ebp - 0x24]
cmp byte [eax + 7], 0
cmovne esi, ecx
jmp 0x1001aac9
push ebx
call fcn.10004df0
add esp, 4
jmp 0x1001aac9
mov esi, 7
mov eax, dword [ebp - 0xc]
xor ecx, ecx
and byte [eax + 0x48], 0xf9
mov word [eax + 0x2c], cx
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret