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

Disassembly:
sub esp, 0x40
xor ecx, ecx
cmp dword [esp + 0x50], ecx
push ebx
mov ebx, dword [esp + 0x48]
setne cl
push ebp
mov ebp, dword [esp + 0x54]
push edi
mov edi, dword [ebx]
movzx edx, byte [ecx + ebp + 0x19]
mov dword [esp + 0x1c], edx
cmp edx, 7
jne 0x4b9d6d
mov eax, dword [edi + 0x20]
and eax, 0x80000
or eax, 0
je 0x4b9d6d
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x40
ret
lea eax, [ebp + 0x1c]
lea eax, [eax + ecx*4]
mov dword [esp + 0x28], eax
push esi
mov esi, dword [eax]
test edx, edx
je 0x4ba315
test esi, esi
jne 0x4ba315
lea eax, [esp + 0x18]
mov dword [esp + 0x24], esi
push eax
lea eax, [esp + 0x28]
mov dword [esp + 0x1c], esi
push eax
push ebp
push dword [esp + 0x64]
xor ecx, ecx
push ebx
mov dword [esp + 0x70], ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x24], ecx
call fcn.004fab00
add esp, 0x14
test eax, eax
jne 0x4ba2c1
xor ecx, ecx
mov dword [esp + 0x28], ecx
cmp dword [ebp + 0x14], ecx
jle 0x4ba051
mov dword [esp + 0x38], 0x57ac80
mov dword [esp + 0x3c], 3
mov dword [esp + 0x40], 0x56efa0
mov dword [esp + 0x44], 3
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4b9e00
mov esi, dword [eax + ecx*4]
jmp 0x4b9e03
mov esi, dword [ebp + 0x24]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4b9e18
mov eax, dword [eax + 4]
movsx ecx, word [eax + ecx*2]
mov eax, dword [esp + 0x58]
jmp 0x4b9e20
mov eax, dword [esp + 0x58]
movsx ecx, word [eax + 0x20]
mov eax, dword [eax + 4]
add ecx, ecx
mov ecx, dword [eax + ecx*8]
mov dword [esp + 0x30], ecx
test ecx, ecx
je 0x4b9e42
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4b9e33
sub ecx, edx
and ecx, 0x3fffffff
mov eax, dword [ebp]
shl esi, 4
mov dword [esp + 0x34], ecx
mov eax, dword [eax + 4]
mov ecx, dword [esi + eax]
mov dword [esp + 0x48], ecx
test ecx, ecx
je 0x4b9e6f
lea edx, [ecx + 1]
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4b9e60
sub ecx, edx
and ecx, 0x3fffffff
push 0
lea eax, [esp + 0x4c]
mov dword [esp + 0x50], ecx
push eax
push 0x3b
push edi
call fcn.004f3920
add esp, 0x10
push eax
push 0
lea eax, [esp + 0x38]
push eax
push 0x3b
push edi
call fcn.004f3920
add esp, 0x10
push eax
push 0
lea eax, [esp + 0x44]
push eax
push 0x3b
push edi
call fcn.004f3920
add esp, 0x10
push eax
push 0x8d
push ebx
call fcn.00508d60
add esp, 0x10
push eax
push 0x35
push ebx
call fcn.00508d60
push eax
push dword [esp + 0x70]
push ebx
call fcn.004f3ae0
mov ecx, dword [esp + 0x7c]
add esp, 0x1c
mov dword [esp + 0x5c], eax
test ecx, ecx
je 0x4b9f69
push 0
lea eax, [esp + 0x34]
push eax
push 0x3b
push edi
call fcn.004f3920
add esp, 0x10
push eax
push 0
lea eax, [esp + 0x48]
push eax
push 0x3b
push edi
call fcn.004f3920
add esp, 0x10
push eax
push 0x8d
push ebx
call fcn.00508d60
add esp, 0x10
push eax
push 0
lea eax, [esp + 0x38]
push eax
push 0x3b
push edi
call fcn.004f3920
add esp, 0x10
push eax
push 0
lea eax, [esp + 0x44]
push eax
push 0x3b
push edi
call fcn.004f3920
add esp, 0x10
push eax
push 0x8d
push ebx
call fcn.00508d60
add esp, 0x10
push eax
push 0x2d
push ebx
call fcn.00508d60
push eax
push dword [esp + 0x24]
push ebx
call fcn.004f3ae0
mov ecx, dword [esp + 0x7c]
add esp, 0x1c
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x20]
cmp eax, 7
je 0x4ba03f
cmp eax, 0xa
jne 0x4b9fbb
test ecx, ecx
je 0x4ba03f
push 0
lea eax, [esp + 0x34]
push eax
push 0x3b
push edi
call fcn.004f3920
add esp, 0x10
push eax
push 0
lea eax, [esp + 0x48]
push eax
push 0x3b
push edi
call fcn.004f3920
add esp, 0x10
push eax
push 0x8d
push ebx
call fcn.00508d60
add esp, 0x10
mov esi, eax
jmp 0x4ba01d
cmp eax, 9
jne 0x4b9fec
mov ecx, dword [ebp]
mov eax, dword [ecx + 4]
add eax, esi
test byte [eax + 0xe], 0x60
jne 0x4b9fec
push eax
push ecx
call fcn.004ee3a0
add esp, 8
test eax, eax
je 0x4b9fec
push 0
push eax
push edi
call fcn.004f6d20
add esp, 0xc
mov esi, eax
jmp 0x4ba01d
push 0
push 0x34
push edi
call fcn.004f0ee0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x4ba01d
push 0x34
push 0
push esi
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [esi + 0x18], 1
or eax, 0xffffffff
mov word [esi + 0x22], ax
mov byte [esi], 0x79
push esi
push dword [esp + 0x18]
push ebx
call fcn.004f7b20
mov esi, eax
lea eax, [esp + 0x54]
push 0
push eax
push esi
push ebx
mov dword [esp + 0x30], esi
call fcn.004f80f0
add esp, 0x1c
mov ecx, dword [esp + 0x28]
inc ecx
mov dword [esp + 0x28], ecx
cmp ecx, dword [ebp + 0x14]
jl 0x4b9df3
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4ba063
push eax
push edi
call fcn.004f0e00
add esp, 8
mov eax, dword [ebp]
mov ebp, dword [eax]
mov dword [esp + 0x18], ebp
test ebp, ebp
jne 0x4ba074
xor ebx, ebx
jmp 0x4ba08f
mov ebx, ebp
lea ecx, [ebx + 1]
lea esp, [esp]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x4ba080
sub ebx, ecx
and ebx, 0x3fffffff
cmp dword [esp + 0x20], 7
jne 0x4ba171
push 0
lea eax, [esp + 0x4c]
mov dword [esp + 0x44], ebp
push eax
push 0x47
push edi
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], str.FOREIGN_KEY_constraint_failed
mov dword [esp + 0x5c], 0x1d
call fcn.004f3920
add esp, 0x10
mov dword [esp + 0x24], eax
test eax, eax
je 0x4ba0d0
mov byte [eax + 1], 2
mov esi, dword [esp + 0x54]
push 0
push 0x50
mov eax, dword [esi]
push eax
mov dword [esp + 0x34], eax
call fcn.004f0ee0
mov ebp, eax
add esp, 0xc
test ebp, ebp
je 0x4ba13d
push 0x48
lea eax, [ebp + 8]
mov dword [ebp + 4], 1
push 0
push eax
mov dword [ebp], 1
call sub.MSVCRT.dll_memset
mov dword [ebp + 0x34], 0xffffffff
mov eax, dword [ebp]
lea eax, [eax + eax*8]
lea esi, [eax*8]
lea eax, [esp + 0x4c]
push eax
push dword [esp + 0x38]
call fcn.005080e0
mov dword [esi + ebp - 0x38], eax
add esp, 0x14
mov dword [esi + ebp - 0x3c], 0
mov esi, dword [esp + 0x54]
push dword [esp + 0x24]
push dword [esi]
call fcn.004f7c30
push 0
push 0
push 0
push 0
push 0
push dword [esp + 0x78]
push ebp
push eax
push esi
call fcn.00514240
mov ebp, dword [esp + 0x44]
add esp, 0x2c
mov dword [esp + 0x1c], eax
mov dword [esp + 0x5c], 0
inc dword [edi + 0x130]
xor eax, eax
mov word [edi + 0x134], ax
lea eax, [ebx + 0x55]
push 0
push eax
push edi
call fcn.004f0ee0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x4ba24b
lea eax, [ebx + 0x55]
push eax
push 0
push esi
call sub.MSVCRT.dll_memset
add esp, 0xc
test esi, esi
je 0x4ba24b
lea ecx, [esi + 0x24]
push ebx
lea eax, [ecx + 0x30]
mov dword [esi + 0x1c], ecx
push ebp
push eax
mov dword [esp + 0x34], ecx
mov dword [ecx + 0xc], eax
call sub.MSVCRT.dll_memcpy
mov eax, dword [esp + 0x68]
add esp, 0xc
test eax, eax
je 0x4ba1e3
push 0
push 1
push eax
push edi
call fcn.004b7db0
add esp, 0x10
jmp 0x4ba1e5
xor eax, eax
mov ebp, dword [esp + 0x28]
mov ebx, dword [esp + 0x14]
push 1
push ebx
push edi
mov dword [ebp + 0x14], eax
call fcn.004f7ed0
push 1
push dword [esp + 0x2c]
mov dword [ebp + 0x18], eax
push edi
call fcn.00513fd0
mov ecx, dword [esp + 0x28]
add esp, 0x18
mov dword [ebp + 8], eax
test ecx, ecx
je 0x4ba251
push 0
push ecx
push 0x13
push dword [esp + 0x60]
call fcn.00508d60
mov ecx, eax
add esp, 0x10
mov dword [esp + 0x10], ecx
test ecx, ecx
je 0x4ba244
push 0
push 1
push ecx
push edi
call fcn.004b7db0
add esp, 0x10
mov dword [esi + 0xc], eax
jmp 0x4ba251
xor eax, eax
mov dword [esi + 0xc], eax
jmp 0x4ba251
mov ebx, dword [esp + 0x14]
xor ebp, ebp
dec dword [edi + 0x130]
je 0x4ba25d
xor eax, eax
jmp 0x4ba264
movzx eax, word [edi + 0x136]
mov word [edi + 0x134], ax
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x4ba27d
push eax
push edi
call fcn.004f6c70
add esp, 8
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4ba28f
push eax
push edi
call fcn.004f6c70
add esp, 8
test ebx, ebx
je 0x4ba29d
push ebx
push edi
call fcn.004b85c0
add esp, 8
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4ba2b1
push 1
push eax
push edi
call fcn.004af4d0
add esp, 0xc
cmp byte [edi + 0x57], 1
jne 0x4ba2cb
push esi
push edi
call fcn.004bb440
add esp, 8
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x40
ret
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x60]
cmp eax, 7
je 0x4ba2ed
cmp eax, 0xa
jne 0x4ba2e7
test edx, edx
jne 0x4ba2e7
mov byte [ebp], pe_nt_image_headers32
jmp 0x4ba2f1
mov byte [ebp], 0x81
jmp 0x4ba2f1
mov byte [ebp], 0x8a
mov ecx, dword [esp + 0x58]
test edx, edx
mov dword [ebp + 4], esi
mov eax, dword [ecx + 0x3c]
mov dword [esi + 0x14], eax
mov ecx, dword [ecx + 0x3c]
mov eax, dword [esp + 0x2c]
mov dword [esi + 0x18], ecx
setne cl
sub cl, 0x80
mov dword [eax], esi
mov byte [esi + 8], cl
mov eax, esi
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x40
ret