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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
push ebx
mov ebx, ecx
mov dword [esp + 0x20], 0
and dl, 2
push esi
mov byte [esp + 0xb], dl
mov esi, dword [ebx]
movsx edx, byte [ebx + 0x44]
push edi
mov dword [esp + 0x18], edx
mov eax, dword [esi + 4]
mov edi, dword [ebx + edx*4 + 0x78]
mov dword [esp + 0x1c], eax
lea eax, [ebx + 0x50]
movzx ecx, word [eax + edx*2]
lea eax, [eax + edx*2]
mov dword [esp + 0x34], eax
mov eax, dword [edi + 0x40]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], edi
mov ax, word [eax + ecx*2]
mov ch, al
mov cl, ah
movzx eax, word [edi + 0x14]
movzx ecx, cx
and ecx, eax
add ecx, dword [edi + 0x38]
cmp byte [edi + 4], 0
mov dword [esp + 0x14], ecx
jne 0x1004d2e2
and byte [ebx + 0x40], 0xf1
xor eax, eax
cmp byte [ebx + 0x42], 1
mov dword [esp + 0x10], 0
mov word [ebx + 0x22], ax
jne 0x1004d2cf
movzx ecx, word [ebx + edx*2 + 0x50]
test cx, cx
je 0x1004d2cf
mov eax, dword [ebx + edx*4 + 0x78]
cmp byte [eax + 4], 0
je 0x1004d2cf
lea eax, [ecx - 1]
mov word [ebx + edx*2 + 0x50], ax
jmp 0x1004d2e2
lea edx, [esp + 0x10]
mov ecx, ebx
call fcn.10049ba0
test eax, eax
jne 0x1004d635
test byte [ebx + 0x40], 0x20
je 0x1004d302
mov edx, dword [ebx + 0x34]
mov ecx, dword [esp + 0x1c]
push ebx
call fcn.10044bc0
mov edx, eax
add esp, 4
test edx, edx
jne 0x1004d633
cmp dword [ebx + 0x48], 0
jne 0x1004d341
cmp byte [esi + 0xb], 0
mov ecx, dword [ebx + 0x10]
mov edx, dword [ebx + 0x14]
je 0x1004d341
mov eax, dword [esi + 4]
mov byte [esi + 0xb], 0
mov eax, dword [eax + 8]
test eax, eax
je 0x1004d341
test byte [eax + 0x40], 0x10
je 0x1004d33a
mov byte [esi + 0xb], 1
cmp dword [eax + 0x10], ecx
jne 0x1004d33a
cmp dword [eax + 0x14], edx
jne 0x1004d33a
mov byte [eax + 0x42], 0
mov eax, dword [eax + 8]
test eax, eax
jne 0x1004d322
cmp byte [esp + 0xf], 0
je 0x1004d385
cmp byte [edi + 4], 0
je 0x1004d3c0
push dword [esp + 0x14]
push edi
call fcn.10045390
movzx esi, word [edi + 0x10]
add esp, 8
movzx ecx, ax
add esi, 2
mov eax, dword [esp + 0x1c]
add esi, ecx
mov ecx, dword [eax + 0x24]
mov eax, 0xaaaaaaab
add ecx, ecx
mul ecx
shr edx, 1
cmp esi, edx
jg 0x1004d3c0
mov dword [esp + 0x28], 1
mov ecx, dword [edi + 0x48]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + 0x2c]
test eax, eax
jne 0x1004d635
test byte [ecx + 0x18], 4
je 0x1004d42d
mov eax, dword [edx + 0x1c]
cmp eax, dword [ecx + 0x14]
jb 0x1004d42d
cmp dword [edx + 0x68], 0
je 0x1004d44f
call fcn.1003fc70
jmp 0x1004d447
mov ecx, ebx
call fcn.10048b30
cmp byte [ebx + 0x45], 0
mov ecx, dword [ebx + 0x10]
mov eax, dword [ebx + 0x14]
mov dword [ebx + 0x28], ecx
mov dword [ebx + 0x2c], eax
jne 0x1004d385
push eax
push ecx
call fcn.10033440
mov esi, eax
add esp, 8
test esi, esi
je 0x1004d41f
push 0
push esi
push dword [ebx + 0x28]
xor edx, edx
mov ecx, ebx
call fcn.10048db0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x1004d40d
mov edi, dword [esp + 0x20]
mov dword [ebx + 0x30], esi
jmp 0x1004d385
push esi
call fcn.10033830
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, 7
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edx + 0x9c]
cmp eax, dword [edx + 0xa0]
jbe 0x1004d442
call fcn.10041430
jmp 0x1004d447
call fcn.10041390
test eax, eax
jne 0x1004d635
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push eax
mov ecx, edi
call fcn.1004a7a0
mov edx, dword [esp + 0x28]
add esp, 4
mov dword [esp + 0x14], eax
mov ecx, edi
lea eax, [esp + 0x14]
push eax
movzx eax, word [esp + 0x14]
push eax
call fcn.1004ace0
mov edx, dword [esp + 0x1c]
add esp, 8
test edx, edx
jne 0x1004d633
cmp byte [edi + 4], dl
jne 0x1004d572
movsx eax, byte [ebx + 0x44]
mov esi, dword [ebx + eax*4 + 0x78]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x10], esi
movzx ecx, word [esi + 0x12]
mov eax, dword [ebx + eax*4 + 0x7c]
mov edx, dword [esi + 0x38]
mov eax, dword [eax + 0x54]
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 + 0x14]
movzx ecx, cx
and ecx, eax
lea eax, [edx + 4]
add ecx, edx
mov dword [esp + 0x30], ecx
cmp ecx, eax
jae 0x1004d502
push 0x100f3b28
push 0xfa0d
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call fcn.10035bd0
add esp, 0x14
mov eax, 0xb
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x4c]
push ecx
push esi
call eax
mov ecx, dword [esp + 0x18]
movzx edi, ax
mov eax, dword [esp + 0x24]
mov ecx, dword [ecx + 0x48]
mov esi, dword [eax + 0x50]
call fcn.10041620
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x38]
lea eax, [edi + 4]
push esi
push eax
mov eax, dword [esp + 0x48]
add eax, 0xfffffffc
push eax
call fcn.1004ae10
add esp, 0x1c
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x14]
mov ecx, eax
push edi
movzx edx, word [eax + 0x12]
dec edx
call fcn.1004ace0
mov edx, dword [esp + 0x1c]
add esp, 8
test edx, edx
jne 0x1004d633
mov edi, dword [esp + 0x20]
mov ecx, ebx
call fcn.1004ce20
mov edx, eax
test edx, edx
jne 0x1004d633
mov cl, byte [ebx + 0x44]
movsx eax, cl
cmp eax, dword [esp + 0x18]
jle 0x1004d5dd
mov edx, dword [esp + 0x18]
movsx eax, cl
dec cl
mov eax, dword [ebx + eax*4 + 0x78]
mov byte [ebx + 0x44], cl
test eax, eax
je 0x1004d5c9
mov ecx, dword [eax + 0x48]
test byte [ecx + 0x18], 0x40
mov esi, dword [ecx + 0x10]
je 0x1004d5b6
call fcn.1003f710
jmp 0x1004d5bb
call fcn.1003bef0
mov ecx, esi
call fcn.100409e0
mov cl, byte [ebx + 0x44]
mov edx, dword [esp + 0x18]
movsx eax, cl
cmp eax, edx
jg 0x1004d593
mov ecx, ebx
call fcn.1004ce20
mov edx, eax
test edx, edx
jne 0x1004d633
cmp dword [esp + 0x28], 0
je 0x1004d61f
mov byte [ebx + 0x42], 2
movzx eax, word [edi + 0x12]
cmp dword [esp + 0x24], eax
jb 0x1004d60f
mov ecx, dword [esp + 0x34]
mov dword [ebx + 0x3c], 0xffffffff
mov ax, word [edi + 0x12]
dec ax
mov word [ecx], ax
mov eax, edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebx + 0x3c], 1
mov eax, edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, ebx
call fcn.100491a0
cmp byte [esp + 0xf], 0
mov edx, eax
je 0x1004d633
mov byte [ebx + 0x42], 3
mov eax, edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret