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

Disassembly:
sub esp, 0x24
push ebx
mov ebx, dword [esp + 0x38]
push esi
mov esi, dword [esp + 0x38]
push edi
mov edi, dword [esp + 0x34]
cmp byte [edi + 0x42], 1
jne 0x47b287
mov al, byte [edi + 0x40]
test al, 2
je 0x47b287
cmp byte [edi + 0x45], 0
je 0x47b287
mov edx, dword [edi + 0x10]
mov ecx, dword [edi + 0x14]
cmp edx, esi
jne 0x47b266
cmp ecx, ebx
jne 0x47b266
mov eax, dword [esp + 0x48]
pop edi
pop esi
pop ebx
mov dword [eax], 0
xor eax, eax
add esp, 0x24
ret
test al, 8
je 0x47b287
cmp ecx, ebx
jg 0x47b287
jl 0x47b274
cmp edx, esi
jae 0x47b287
mov eax, dword [esp + 0x48]
pop edi
pop esi
pop ebx
mov dword [eax], 0xffffffff
xor eax, eax
add esp, 0x24
ret
mov ebx, dword [esp + 0x38]
test ebx, ebx
je 0x47b2a2
push ebx
call fcn.004aa290
add esp, 4
mov dword [esp + 0x10], eax
mov byte [ebx + 7], 0
jmp 0x47b2aa
mov dword [esp + 0x10], 0
push edi
call fcn.00467dc0
add esp, 4
test eax, eax
jne 0x47b6d3
cmp byte [edi + 0x42], al
je 0x47b274
mov ecx, 1
sub ecx, dword [esp + 0x44]
mov dword [esp + 0x24], ecx
push ebp
mov edi, edi
movsx eax, byte [edi + 0x44]
mov dword [esp + 0x1c], 0
mov ebp, dword [edi + eax*4 + 0x78]
mov dword [esp + 0x24], ebp
movzx esi, word [ebp + 0x12]
dec esi
mov ebx, esi
mov dword [esp + 0x18], esi
sar ebx, cl
cmp dword [esp + 0x14], 0
mov word [edi + eax*2 + 0x50], bx
jne 0x47b3e1
mov eax, dword [ebp + 0x40]
mov dl, byte [ebp + 3]
mov ax, word [eax + ebx*2]
mov ch, al
mov cl, ah
movzx eax, cx
movzx ecx, word [ebp + 0x14]
and eax, ecx
add eax, dword [ebp + 0x44]
test dl, dl
je 0x47b336
cmp byte [eax], 0x80
jb 0x47b335
mov ecx, dword [ebp + 0x3c]
inc eax
cmp eax, ecx
jae 0x47b5f6
cmp byte [eax], 0x80
jae 0x47b327
inc eax
lea ecx, [esp + 0x2c]
push ecx
push eax
call fcn.0048e450
mov ecx, dword [esp + 0x38]
add esp, 8
mov eax, dword [esp + 0x2c]
cmp ecx, dword [esp + 0x44]
jg 0x47b394
jl 0x47b35c
mov edx, dword [esp + 0x40]
cmp eax, edx
jae 0x47b398
lea edx, [ebx + 1]
mov dword [esp + 0x1c], edx
cmp edx, esi
jle 0x47b3af
or edi, 0xffffffff
cmp byte [ebp + 5], 0
jne 0x47b62d
mov edi, dword [esp + 0x38]
movzx eax, word [ebp + 0x12]
cmp edx, eax
jl 0x47b5b0
movzx ecx, byte [ebp + 6]
mov eax, dword [ebp + 0x38]
mov ecx, dword [ecx + eax + 8]
jmp 0x47b5ca
mov edx, dword [esp + 0x40]
cmp ecx, dword [esp + 0x44]
jl 0x47b3c0
jg 0x47b3a4
cmp eax, edx
jbe 0x47b3c0
mov edx, dword [esp + 0x1c]
lea esi, [ebx - 1]
cmp edx, esi
jg 0x47b3b9
lea ebx, [esi + edx]
sar ebx, 1
jmp 0x47b301
mov edi, 1
jmp 0x47b36a
or byte [edi + 0x40], 2
mov dword [edi + 0x10], eax
movsx eax, byte [edi + 0x44]
mov dword [edi + 0x14], ecx
mov word [edi + eax*2 + 0x50], bx
cmp byte [ebp + 5], 0
jne 0x47b61c
mov edx, ebx
jmp 0x47b378
mov eax, dword [ebp + 0x40]
mov ax, word [eax + ebx*2]
mov ch, al
mov cl, ah
movzx eax, word [ebp + 0x14]
movzx ecx, cx
and ecx, eax
movzx eax, byte [ebp + 8]
add ecx, dword [ebp + 0x44]
movzx edx, byte [ecx]
cmp edx, eax
jg 0x47b41a
push dword [esp + 0x3c]
lea eax, [ecx + 1]
push eax
push edx
call dword [esp + 0x20]
add esp, 0xc
mov edi, eax
jmp 0x47b57c
mov al, byte [ecx + 1]
test al, al
js 0x47b44b
and edx, 0x7f
movzx eax, al
shl edx, 7
add edx, eax
movzx eax, word [ebp + 0xa]
cmp edx, eax
jg 0x47b44b
push dword [esp + 0x3c]
lea eax, [ecx + 2]
push eax
push edx
call dword [esp + 0x20]
add esp, 0xc
mov edi, eax
jmp 0x47b57c
movzx eax, byte [ebp + 7]
lea esi, [edi + 0x10]
sub ecx, eax
mov eax, dword [ebp + 0x50]
push esi
push ecx
push ebp
call eax
mov ebp, dword [esi]
add esp, 0xc
cmp ebp, 2
jl 0x47b6a4
lea eax, [ebp + 0x12]
cdq
mov esi, eax
mov ecx, esi
or ecx, edx
je 0x47b69d
test edx, edx
ja 0x47b69d
jb 0x47b490
cmp esi, 0x7fffff00
jae 0x47b69d
cmp dword [0x4e2568], 0
je 0x47b4d6
mov eax, dword [0x4e4db0]
test eax, eax
je 0x47b4ac
push eax
call dword [0x4e25bc]
add esp, 4
lea eax, [esp + 0x20]
push eax
push esi
call fcn.004677e0
mov eax, dword [0x4e4db0]
add esp, 8
test eax, eax
je 0x47b4d0
push eax
call dword [0x4e25c4]
mov esi, dword [esp + 0x24]
jmp 0x47b4e3
mov esi, dword [esp + 0x20]
jmp 0x47b4e6
push esi
call dword [0x4e258c]
mov esi, eax
mov dword [esp + 0x24], esi
add esp, 4
test esi, esi
je 0x47b69d
movsx ecx, byte [edi + 0x44]
push 2
push esi
push ebp
push 0
push edi
mov word [edi + ecx*2 + 0x50], bx
call fcn.00441880
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x47b692
push dword [esp + 0x3c]
push esi
push ebp
call dword [esp + 0x20]
add esp, 0xc
mov edi, eax
cmp dword [0x4e2568], 0
je 0x47b56a
mov eax, dword [0x4e4db0]
test eax, eax
je 0x47b53b
push eax
call dword [0x4e25bc]
add esp, 4
push esi
call dword [0x4e2598]
sub dword [0x4e4c08], eax
dec dword [0x4e4c2c]
push esi
call dword [0x4e2590]
mov eax, dword [0x4e4db0]
add esp, 8
test eax, eax
je 0x47b574
push eax
call dword [0x4e25c4]
jmp 0x47b571
push esi
call dword [0x4e2590]
add esp, 4
mov esi, dword [esp + 0x18]
mov ebp, dword [esp + 0x24]
test edi, edi
jns 0x47b589
lea edx, [ebx + 1]
mov dword [esp + 0x1c], edx
jmp 0x47b59a
jle 0x47b656
mov edx, dword [esp + 0x1c]
lea esi, [ebx - 1]
mov dword [esp + 0x18], esi
cmp edx, esi
jg 0x47b36a
mov edi, dword [esp + 0x38]
lea ebx, [esi + edx]
sar ebx, 1
jmp 0x47b3e1
mov eax, dword [ebp + 0x40]
mov ax, word [eax + edx*2]
mov ch, al
mov cl, ah
movzx eax, word [ebp + 0x14]
movzx ecx, cx
and ecx, eax
mov eax, dword [ebp + 0x38]
mov ecx, dword [ecx + eax]
movsx eax, byte [edi + 0x44]
bswap ecx
push ecx
push edi
mov word [edi + eax*2 + 0x50], dx
call fcn.00467bb0
mov edi, eax
add esp, 8
test edi, edi
jne 0x47b6c2
mov edi, dword [esp + 0x38]
mov ecx, dword [esp + 0x28]
jmp 0x47b2d0
push 0x4df4a4
push 0xe611
push str.database_corruption_at_line__d_of___.10s_
push 0xb
call fcn.0043b3c0
add esp, 0x10
mov eax, 0xb
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x24
ret
mov eax, dword [esp + 0x4c]
xor edi, edi
mov dword [eax], 0
jmp 0x47b6c2
mov ecx, dword [esp + 0x38]
pop ebp
movsx eax, byte [ecx + 0x44]
mov word [ecx + eax*2 + 0x50], bx
mov eax, dword [esp + 0x48]
mov dword [eax], edi
xor eax, eax
xor edi, edi
mov word [ecx + 0x24], ax
and byte [ecx + 0x40], 0xf9
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0x24
ret
mov eax, dword [esp + 0x4c]
xor edi, edi
mov ecx, dword [esp + 0x38]
mov dword [eax], 0
movsx eax, byte [ecx + 0x44]
mov word [ecx + eax*2 + 0x50], bx
mov eax, dword [esp + 0x3c]
cmp byte [eax + 7], 0
je 0x47b6c6
xor eax, eax
mov edi, 0xb
and byte [ecx + 0x40], 0xf9
pop ebp
mov word [ecx + 0x24], ax
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0x24
ret
push esi
call fcn.00438320
add esp, 4
jmp 0x47b6c2
mov edi, 7
jmp 0x47b6c2
push 0x4df4a4
push 0xe65a
push str.database_corruption_at_line__d_of___.10s_
push 0xb
call fcn.0043b3c0
add esp, 0x10
mov edi, 0xb
mov ecx, dword [esp + 0x38]
xor eax, eax
and byte [ecx + 0x40], 0xf9
mov word [ecx + 0x24], ax
mov eax, edi
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x24
ret