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

Disassembly:
sub esp, 0x1c
push ebx
mov ebx, dword [esp + 0x24]
cmp byte [ebx + 0x42], 1
push esi
jne 0x50b076
mov cl, byte [ebx + 0x40]
test cl, 2
je 0x50b076
cmp byte [ebx + 0x45], 0
je 0x50b076
mov eax, dword [ebx + 0x10]
mov edx, dword [esp + 0x30]
mov esi, dword [ebx + 0x14]
cmp eax, edx
jne 0x50b053
cmp esi, dword [esp + 0x34]
jne 0x50b053
mov eax, dword [esp + 0x3c]
pop esi
mov dword [eax], 0
xor eax, eax
pop ebx
add esp, 0x1c
ret
test cl, 8
je 0x50b076
cmp esi, dword [esp + 0x34]
jg 0x50b076
jl 0x50b064
cmp eax, edx
jae 0x50b076
mov ecx, dword [esp + 0x3c]
pop esi
mov dword [ecx], 0xffffffff
xor eax, eax
pop ebx
add esp, 0x1c
ret
mov esi, dword [esp + 0x2c]
test esi, esi
je 0x50b08f
mov eax, esi
call fcn.004eefe0
mov dword [esp + 0x10], eax
mov byte [esi + 0xb], 0
jmp 0x50b097
mov dword [esp + 0x10], 0
mov esi, ebx
call fcn.0050ad40
test eax, eax
jne 0x50b477
cmp byte [ebx + 0x42], al
jne 0x50b0bb
mov edx, dword [esp + 0x3c]
pop esi
mov dword [edx], 0xffffffff
pop ebx
add esp, 0x1c
ret
mov ecx, 1
sub ecx, dword [esp + 0x38]
push ebp
mov dword [esp + 0x1c], ecx
push edi
lea ebx, [ebx]
movsx eax, byte [ebx + 0x44]
mov esi, dword [ebx + eax*4 + 0x78]
movzx ebp, word [esi + 0x12]
dec ebp
mov dword [esp + 0x1c], ebp
sar ebp, cl
cmp dword [esp + 0x18], 0
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], 0
mov word [ebx + eax*2 + 0x50], bp
jne 0x50b1f7
mov al, byte [esi + 3]
mov byte [esp + 0x30], al
mov eax, dword [esi + 0x40]
mov cx, word [eax + ebp*2]
mov dh, cl
mov dl, ch
movzx ecx, word [esi + 0x14]
movzx eax, dx
and eax, ecx
add eax, dword [esi + 0x44]
cmp byte [esp + 0x30], 0
je 0x50b13f
cmp byte [eax], 0x80
jb 0x50b13e
mov ecx, dword [esi + 0x3c]
lea esp, [esp]
inc eax
cmp eax, ecx
jae 0x50b3b0
cmp byte [eax], 0x80
jae 0x50b130
inc eax
lea edi, [esp + 0x24]
call fcn.004c0340
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x3c]
cmp eax, edx
mov ecx, dword [esp + 0x24]
jg 0x50b1ab
jl 0x50b160
cmp ecx, dword [esp + 0x38]
jae 0x50b19f
lea eax, [ebp + 1]
cmp eax, dword [esp + 0x1c]
mov dword [esp + 0x10], eax
jle 0x50b1b8
mov dword [esp + 0x30], 0xffffffff
cmp byte [esi + 5], 0
jne 0x50b41d
movzx ecx, word [esi + 0x12]
mov edi, dword [esp + 0x10]
cmp edi, ecx
jl 0x50b36b
movzx edx, byte [esi + 6]
mov eax, dword [esi + 0x38]
mov eax, dword [edx + eax + 8]
jmp 0x50b385
cmp eax, edx
jl 0x50b1d4
jg 0x50b1ab
cmp ecx, dword [esp + 0x38]
jbe 0x50b1d4
lea eax, [ebp - 1]
cmp dword [esp + 0x10], eax
mov dword [esp + 0x1c], eax
jg 0x50b1ca
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
lea ebp, [eax + ecx]
sar ebp, 1
jmp 0x50b106
mov dword [esp + 0x30], 1
jmp 0x50b175
movsx edx, byte [ebx + 0x44]
or byte [ebx + 0x40], 2
mov dword [ebx + 0x10], ecx
mov dword [ebx + 0x14], eax
mov word [ebx + edx*2 + 0x50], bp
cmp byte [esi + 5], 0
jne 0x50b3d6
mov dword [esp + 0x10], ebp
jmp 0x50b17f
mov eax, dword [esi + 0x40]
mov cx, word [eax + ebp*2]
mov dh, cl
mov dl, ch
movzx ecx, word [esi + 0x14]
movzx eax, dx
movzx edx, byte [esi + 8]
and eax, ecx
add eax, dword [esi + 0x44]
movzx ecx, byte [eax]
cmp ecx, edx
jg 0x50b231
mov edx, dword [esp + 0x34]
push edx
inc eax
push eax
push ecx
call dword [esp + 0x24]
add esp, 0xc
mov dword [esp + 0x30], eax
jmp 0x50b333
mov dl, byte [eax + 1]
test dl, dl
js 0x50b269
and ecx, 0x7f
movzx edx, dl
shl ecx, 7
add ecx, edx
mov edx, dword [esp + 0x14]
movzx esi, word [edx + 0xa]
cmp ecx, esi
jg 0x50b26d
mov edx, dword [esp + 0x34]
push edx
add eax, 2
push eax
push ecx
call dword [esp + 0x24]
add esp, 0xc
mov dword [esp + 0x30], eax
jmp 0x50b32f
mov edx, dword [esp + 0x14]
movzx ecx, byte [edx + 7]
lea esi, [ebx + 0x10]
push esi
sub eax, ecx
push eax
push edx
mov edx, dword [edx + 0x50]
call edx
mov esi, dword [esi]
add esp, 0xc
cmp esi, 2
jl 0x50b3ed
lea eax, [esi + 0x12]
cdq
push edx
push eax
call fcn.004cb540
mov edi, eax
add esp, 8
test edi, edi
je 0x50b408
movsx eax, byte [ebx + 0x44]
push 2
push edi
push esi
push 0
push ebx
mov word [ebx + eax*2 + 0x50], bp
call fcn.00506b90
add esp, 0x14
mov dword [esp + 0x30], eax
test eax, eax
jne 0x50b412
mov ecx, dword [esp + 0x34]
push ecx
push edi
push esi
call dword [esp + 0x24]
add esp, 0xc
cmp dword [0x59bf10], 0
mov dword [esp + 0x30], eax
je 0x50b325
mov eax, dword [0x5a2d00]
test eax, eax
je 0x50b2f6
push eax
call dword [0x59bf64]
add esp, 4
push edi
call dword [0x59bf40]
sub dword [0x5a2b48], eax
dec dword [0x5a2b6c]
push edi
call dword [0x59bf38]
mov eax, dword [0x5a2d00]
add esp, 8
test eax, eax
je 0x50b32f
push eax
call dword [0x59bf6c]
jmp 0x50b32c
push edi
call dword [0x59bf38]
add esp, 4
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x30]
test eax, eax
jge 0x50b344
lea edx, [ebp + 1]
mov dword [esp + 0x10], edx
jmp 0x50b351
jle 0x50b43a
lea eax, [ebp - 1]
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
cmp ecx, eax
jg 0x50b175
lea ebp, [eax + ecx]
sar ebp, 1
jmp 0x50b1f7
mov ecx, dword [esi + 0x40]
mov dx, word [ecx + edi*2]
mov ah, dl
mov al, dh
movzx edx, word [esi + 0x14]
movzx ecx, ax
mov eax, dword [esi + 0x38]
and ecx, edx
mov eax, dword [ecx + eax]
movsx ecx, byte [ebx + 0x44]
bswap eax
push eax
mov eax, ebx
mov word [ebx + ecx*2 + 0x50], di
call fcn.0050ace0
add esp, 4
mov dword [esp + 0x30], eax
test eax, eax
jne 0x50b467
mov ecx, dword [esp + 0x20]
jmp 0x50b0d0
push 0x58e0b0
push 0xeb61
push str.database_corruption_at_line__d_of___.10s_
push 0xb
call fcn.004e01f0
add esp, 0x10
pop edi
pop ebp
pop esi
mov eax, 0xb
pop ebx
add esp, 0x1c
ret
mov edx, dword [esp + 0x44]
mov dword [edx], 0
mov dword [esp + 0x30], 0
jmp 0x50b467
push 0x58e0b0
push 0xebaa
push str.database_corruption_at_line__d_of___.10s_
push 0xb
call fcn.004e01f0
add esp, 0x10
jmp 0x50b45f
mov dword [esp + 0x30], 7
jmp 0x50b467
push edi
call fcn.004bf5d0
add esp, 4
jmp 0x50b467
movsx eax, byte [ebx + 0x44]
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x44]
mov word [ebx + eax*2 + 0x50], bp
mov dword [ecx], edx
mov dword [esp + 0x30], 0
jmp 0x50b467
mov eax, dword [esp + 0x44]
mov edx, dword [esp + 0x34]
mov dword [eax], 0
movsx ecx, byte [ebx + 0x44]
mov word [ebx + ecx*2 + 0x50], bp
cmp byte [edx + 0xb], 0
mov dword [esp + 0x30], 0
je 0x50b467
mov dword [esp + 0x30], 0xb
xor eax, eax
and byte [ebx + 0x40], 0xf9
pop edi
mov word [ebx + 0x22], ax
mov eax, dword [esp + 0x2c]
pop ebp
pop esi
pop ebx
add esp, 0x1c
ret