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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
mov eax, dword [0x102beb54]
xor eax, esp
mov dword [esp + 0x40], eax
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x28], 0
and dl, 2
mov byte [esp + 0x13], dl
mov eax, dword [edi]
movzx ecx, word [edi + 0x46]
mov dword [esp + 0xc], eax
mov dword [esp + 0x20], ecx
mov eax, dword [eax + 4]
mov dword [esp + 0x18], eax
movsx eax, byte [edi + 0x44]
mov dword [esp + 0x24], eax
mov ebx, dword [edi + eax*4 + 0x74]
mov dword [esp + 0x14], ebx
mov eax, dword [ebx + 0x40]
mov ax, word [eax + ecx*2]
mov ch, al
mov cl, ah
movzx eax, word [ebx + 0x18]
movzx ecx, cx
and ecx, eax
add ecx, dword [ebx + 0x38]
mov dword [esp + 0x1c], ecx
test dl, dl
je 0x1003a186
cmp byte [ebx + 8], 0
je 0x1003a168
push ecx
push ebx
call fcn.100321b0
movzx esi, word [ebx + 0x14]
add esp, 8
movzx ecx, ax
add esi, 2
add esi, ecx
mov eax, 0xaaaaaaab
mov ecx, dword [esp + 0x18]
mov ecx, dword [ecx + 0x24]
add ecx, ecx
mul ecx
shr edx, 1
cmp esi, edx
jg 0x1003a168
mov dword [esp + 0x28], 1
jmp 0x1003a186
mov bl, byte [edi + 0x45]
mov ecx, edi
call fcn.10035960
test bl, bl
je 0x1003a1cf
mov eax, dword [edi + 0x10]
mov dword [edi + 0x28], eax
mov eax, dword [edi + 0x14]
mov dword [edi + 0x2c], eax
mov ebx, dword [esp + 0x14]
cmp byte [ebx + 8], 0
jne 0x1003a252
and byte [edi + 0x40], 0xf1
xor eax, eax
cmp byte [edi + 0x42], 1
mov word [edi + 0x22], ax
jne 0x1003a243
movzx ecx, word [edi + 0x46]
test cx, cx
je 0x1003a243
movsx eax, byte [edi + 0x44]
mov eax, dword [edi + eax*4 + 0x74]
cmp byte [eax + 8], 0
je 0x1003a243
lea eax, [ecx - 1]
mov word [edi + 0x46], ax
jmp 0x1003a252
mov eax, dword [edi + 0x1c]
push 0
push eax
mov dword [edi + 0x28], eax
mov dword [edi + 0x2c], 0
call fcn.1001fa90
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x1003a22a
push 0
push ebx
push dword [edi + 0x28]
xor edx, edx
mov ecx, edi
call fcn.10035bd0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x1003a20d
mov dword [edi + 0x30], ebx
jmp 0x1003a182
push ebx
call fcn.1001fe80
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.101e95a5
mov esp, ebp
pop ebp
ret
mov esi, 7
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.101e95a5
mov esp, ebp
pop ebp
ret
mov ecx, edi
call fcn.10036ad0
test eax, eax
jne 0x1003a50a
test byte [edi + 0x40], 0x20
je 0x1003a272
mov edx, dword [edi + 0x34]
mov ecx, dword [esp + 0x18]
push edi
call fcn.10031a70
mov ecx, eax
add esp, 4
test ecx, ecx
jne 0x1003a508
cmp dword [edi + 0x70], 0
jne 0x1003a2c8
mov eax, dword [esp + 0xc]
mov edx, dword [edi + 0x10]
mov esi, dword [edi + 0x14]
mov ecx, dword [edi + 0x34]
cmp byte [eax + 0xb], 0
je 0x1003a2c8
mov byte [eax + 0xb], 0
mov eax, dword [eax + 4]
mov eax, dword [eax + 8]
test eax, eax
je 0x1003a2c8
mov ebx, dword [esp + 0xc]
nop dword [eax]
test byte [eax + 0x40], 0x10
je 0x1003a2bd
mov byte [ebx + 0xb], 1
cmp dword [eax + 0x34], ecx
jne 0x1003a2bd
cmp dword [eax + 0x10], edx
jne 0x1003a2bd
cmp dword [eax + 0x14], esi
jne 0x1003a2bd
mov byte [eax + 0x42], 0
mov eax, dword [eax + 8]
test eax, eax
jne 0x1003a2a0
mov ebx, dword [esp + 0x14]
mov ecx, dword [ebx + 0x48]
test byte [ecx + 0x1c], 4
mov edx, dword [ecx + 0x14]
je 0x1003a2e9
mov eax, dword [edx + 0x1c]
cmp eax, dword [ecx + 0x18]
jb 0x1003a2e9
cmp dword [edx + 0x68], 0
je 0x1003a316
call fcn.1002c8e0
jmp 0x1003a30e
mov eax, dword [edx + 0x2c]
test eax, eax
jne 0x1003a50a
mov eax, dword [edx + 0x9c]
cmp eax, dword [edx + 0xa0]
jbe 0x1003a309
call fcn.1002e230
jmp 0x1003a30e
call fcn.1002e160
test eax, eax
jne 0x1003a50a
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x30]
push eax
mov ecx, ebx
call fcn.100375a0
mov edx, dword [esp + 0x24]
add esp, 4
mov dword [esp + 0xc], eax
mov ecx, ebx
lea eax, [esp + 0xc]
push eax
movzx eax, word [esp + 0x46]
push eax
call fcn.10037a50
mov ecx, dword [esp + 0x14]
add esp, 8
test ecx, ecx
jne 0x1003a508
cmp byte [ebx + 8], cl
jne 0x1003a44d
movsx eax, byte [edi + 0x44]
mov esi, dword [edi + eax*4 + 0x74]
mov eax, dword [esp + 0x24]
movzx ecx, word [esi + 0x16]
mov eax, dword [edi + eax*4 + 0x78]
mov edx, dword [esi + 0x38]
mov eax, dword [eax + 4]
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 0x40]
mov ax, word [eax + ecx*2 - 2]
mov ch, al
mov cl, ah
movzx eax, word [esi + 0x18]
movzx ebx, cx
and ebx, eax
lea eax, [edx + 4]
add ebx, edx
cmp ebx, eax
jae 0x1003a3cc
push 0x102af5bc
push 0x10971
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10022360
add esp, 0x14
mov eax, 0xb
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.101e95a5
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x4c]
push ebx
push esi
call eax
mov ecx, dword [esi + 0x48]
add esp, 8
movzx eax, ax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 0x50]
mov dword [esp + 0x18], eax
call fcn.1002e4d0
mov dword [esp + 0xc], eax
test eax, eax
jne 0x1003a425
mov edx, dword [esp + 0x20]
lea eax, [esp + 0xc]
push eax
push dword [esp + 0x30]
mov eax, dword [esp + 0x24]
push dword [esp + 0x20]
add eax, 4
push eax
lea eax, [ebx - 4]
mov ebx, dword [esp + 0x24]
push eax
mov ecx, ebx
call fcn.10037b80
add esp, 0x14
jmp 0x1003a429
mov ebx, dword [esp + 0x14]
movzx edx, word [esi + 0x16]
lea eax, [esp + 0xc]
push eax
push dword [esp + 0x20]
dec edx
mov ecx, esi
call fcn.10037a50
mov ecx, dword [esp + 0x14]
add esp, 8
test ecx, ecx
jne 0x1003a508
mov ecx, edi
call fcn.10039a20
mov ecx, eax
test ecx, ecx
jne 0x1003a508
mov dl, byte [edi + 0x44]
mov esi, dword [esp + 0x24]
movsx eax, dl
cmp eax, esi
jle 0x1003a49f
nop dword [eax]
movsx eax, dl
dec dl
mov ecx, dword [edi + eax*4 + 0x74]
mov byte [edi + 0x44], dl
test ecx, ecx
je 0x1003a48b
mov ecx, dword [ecx + 0x48]
call fcn.1002dc60
mov dl, byte [edi + 0x44]
movsx eax, dl
cmp eax, esi
jg 0x1003a470
mov ecx, edi
call fcn.10039a20
mov ecx, eax
test ecx, ecx
jne 0x1003a508
cmp dword [esp + 0x28], 0
je 0x1003a4f4
mov byte [edi + 0x42], 2
movzx eax, word [ebx + 0x16]
cmp dword [esp + 0x20], eax
jb 0x1003a4d9
mov dword [edi + 0x3c], 0xffffffff
mov ax, word [ebx + 0x16]
dec ax
mov word [edi + 0x46], ax
mov eax, ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.101e95a5
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x3c], 1
mov eax, ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.101e95a5
mov esp, ebp
pop ebp
ret
mov ecx, edi
call fcn.10036060
cmp byte [esp + 0x13], 0
mov ecx, eax
je 0x1003a508
mov byte [edi + 0x42], 3
mov eax, ecx
mov ecx, dword [esp + 0x4c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.101e95a5
mov esp, ebp
pop ebp
ret