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

Disassembly:
sub esp, 0x38
push ebx
push ebp
mov ebp, dword [esp + 0x50]
push esi
push edi
mov edi, dword [esp + 0x5c]
xor ebx, ebx
test edi, edi
jl 0x30582f
lea esi, [edi + 2]
shl esi, 4
add esi, ebp
jmp 0x305831
xor esi, esi
mov edx, dword [esp + 0x54]
movsx eax, dl
cmp eax, 8
mov dword [esp + 0x5c], eax
ja case.0x305845.6
jmp dword [eax*4 + 0x305e54]
mov ecx, edx
sar ecx, 8
test edi, edi
jl 0x30585e
test byte [esi + 0xf], 8
je 0x30585e
add ecx, dword [esi + 8]
cmp eax, 2
je 0x305868
cmp eax, 3
jne case.0x305845.1
mov ebx, dword [esp + 0x4c]
cmp byte [ebx + eax*8 + 0x40], 0
jne case.0x305845.1
mov edx, dword [ebx + eax*8 + 0x3c]
call fcn.0030ccb0
test eax, eax
je 0x3058bd
mov eax, dword [eax + 0xc]
movsx eax, byte [eax + 4]
test eax, eax
je 0x3058bd
movsx eax, byte [ebp + 0x1c]
shl edi, 4
movsx edi, word [edi + ebp + 0x2c]
call fcn.002161b0
call fcn.00300ec0
push eax
mov eax, dword [esp + 0x54]
push esi
push ebp
push eax
mov ecx, ebx
push ecx
call fcn.00305620
pop edi
pop esi
pop ebp
mov ebx, eax
pop ebx
add esp, 0x38
ret 0x14
mov edx, dword [esp + 0x54]
mov ebp, dword [esp + 0x4c]
mov ebx, dword [esp + 0x5c]
mov esi, edx
push 1
sar esi, 8
push esi
mov edi, ebp
call fcn.00300ad0
mov edi, eax
mov ebx, dword [edi + 8]
test ebx, ebx
jne case.0x305845.6
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x50]
lea edx, [ebp + 4]
push edx
push esi
push eax
push ecx
push ebp
call fcn.00304cc0
mov ebx, eax
mov dword [edi + 8], ebx
mov byte [edi + 0x11], 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 0x14
cmp dl, 5
jne 0x305a4d
lea eax, [ebp + 0x50]
call fcn.002162b0
test eax, eax
je 0x305a4d
mov esi, dword [esi + 0xc]
shl esi, 0xb
sar esi, 0x1b
cmp esi, 0xa
ja case.0x305934.1
jmp dword [esi*4 + 0x305e78]
mov edi, 0xc
jmp 0x30597f
mov edi, 0xa
jmp 0x30597f
mov edi, 8
jmp 0x30597f
mov edi, 0xb
jmp 0x30597f
mov edi, 9
jmp 0x30597f
mov edi, 7
jmp 0x30597f
mov edi, 3
jmp 0x30597f
mov edi, 4
jmp 0x30597f
mov edi, 0xe
jmp 0x30597f
mov edi, 2
mov ecx, dword [esp + 0x4c]
mov edx, dword [ecx + 0x38]
xor eax, eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov eax, dword [ecx]
lea ebx, [esp + 0x20]
lea esi, [esp + 0x30]
mov dword [esp + 0x40], edx
mov dword [esp + 0x30], 0x20
mov dword [esp + 0x3c], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], 0xffffffff
call fcn.003306f0
mov esi, eax
mov eax, edi
call fcn.00300d10
test eax, eax
je 0x305a13
mov eax, dword [ebp + 0x58]
mov ecx, dword [ebp + 0x74]
mov edx, dword [ebp + 0x90]
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0xac]
mov dword [esp + 0x2c], eax
push esi
lea ebx, [esp + 0x24]
mov eax, 4
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edx
call fcn.00330ca0
pop edi
mov ebx, esi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x38
ret 0x14
mov eax, edi
call fcn.00300d30
mov eax, dword [ebp + 0x58]
mov edx, dword [ebp + 0x90]
mov ecx, dword [ebp + 0x74]
mov ebp, dword [ebp + 0xac]
mov dword [esi + 0x70], eax
mov dword [esi + 0x74], ecx
mov dword [esi + 0x78], edx
mov dword [esi + 0x7c], ebp
pop edi
mov ebx, esi
mov dword [esi + 0x6c], 4
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x38
ret 0x14
mov eax, dword [esi + 0xc]
mov ebx, dword [esp + 0x50]
mov edi, dword [esp + 0x4c]
shr eax, 0x1b
and eax, 1
je 0x305ab9
cmp dword [edi + 0xe0], 1
jne 0x305ab9
test byte [ebx + 0x3d], 0x3c
jne 0x305ab9
mov ecx, dword [edi + 0xd4]
mov eax, edi
call fcn.00304df0
test eax, eax
jne 0x305a97
push eax
push eax
push eax
push eax
push eax
push eax
push ebp
push eax
push esi
push ecx
push 4
push 2
push 0x27
push ebx
push edi
call fcn.00303f20
mov ecx, dword [esi + 8]
push ebp
push 4
shl ecx, 4
push ecx
add esi, 4
push esi
push eax
push ebx
push edi
call fcn.003054c0
pop edi
pop esi
pop ebp
mov ebx, eax
pop ebx
add esp, 0x38
ret 0x14
test eax, eax
je 0x305b98
cmp dword [edi + 0xe0], 3
jne 0x305b98
mov edi, dword [esp + 0x4c]
mov eax, dword [esp + 0x5c]
push esi
sar edx, 8
push ebp
push edx
mov dword [esp + 0x60], edx
mov edx, dword [esp + 0x5c]
push edx
push edi
lea edx, [esp + 0x24]
call fcn.00302c50
mov eax, dword [edi]
mov eax, dword [eax + 0x28]
lea ebx, [esp + 0x10]
call fcn.002be4b0
mov dword [esp + 0x5c], eax
mov ecx, eax
mov eax, edi
call fcn.00304df0
mov ecx, dword [esp + 0x50]
test byte [ecx + 0x3d], 0x3c
mov ebx, eax
je 0x305b2b
mov eax, dword [esp + 0x54]
mov edx, edi
push edx
mov edx, dword [esi + 8]
lea edi, [esp + 0x58]
call fcn.00303da0
jmp 0x305b34
mov eax, 4
mov dword [esp + 0x54], eax
test ebx, ebx
mov edi, dword [esp + 0x50]
lea ecx, [eax*4]
mov dword [esp + 0x58], ecx
jne 0x305b6d
mov edx, dword [edi + 0x184]
mov ecx, dword [esp + 0x5c]
push edx
push ebx
push ebx
mov edx, dword [esp + 0x58]
push ebx
push ebx
push ebx
push ebp
push ebx
push esi
push ecx
push eax
push 2
push 0x25
push edi
push edx
call fcn.00303f20
mov ebx, eax
mov ecx, dword [esi + 8]
imul ecx, dword [esp + 0x58]
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x4c]
push ebp
push eax
push ecx
add esi, 4
push esi
push ebx
push edi
push edx
call fcn.003054c0
pop edi
pop esi
pop ebp
mov ebx, eax
pop ebx
add esp, 0x38
ret 0x14
mov eax, dword [esp + 0x50]
mov edi, dword [esp + 0x4c]
push esi
sar edx, 8
push ebp
push edx
push eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x64], edx
push edi
lea edx, [esp + 0x24]
call fcn.00302c50
mov ecx, dword [edi]
mov eax, dword [ecx + 0x28]
lea ebx, [esp + 0x10]
call fcn.002be4b0
mov ecx, eax
mov eax, edi
mov dword [esp + 0x5c], ecx
call fcn.00304df0
mov edx, dword [esp + 0x50]
mov edx, dword [edx + 0x3c]
and edx, 0x3c00
mov ebx, eax
mov dword [esp + 0x58], edx
mov eax, 4
je 0x305c17
test byte [esi + 0xf], 8
je 0x305bf9
mov edx, dword [esi + 8]
jmp 0x305bfb
xor edx, edx
mov eax, dword [esp + 0x4c]
push eax
mov eax, dword [esp + 0x58]
lea edi, [esp + 0x58]
call fcn.00303da0
mov edx, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
jmp 0x305c1b
mov dword [esp + 0x54], eax
test ebx, ebx
lea edi, [eax*4]
mov dword [esp + 0x58], edi
jne 0x305cb8
test edx, edx
je case.0x305c40.1
mov edx, dword [esi + 0xc]
shl edx, 0xb
sar edx, 0x1b
cmp edx, 0xa
ja case.0x305c40.1
jmp dword [edx*4 + 0x305ea4]
mov edx, 0xc
jmp 0x305c8b
mov edx, 0xa
jmp 0x305c8b
mov edx, 8
jmp 0x305c8b
mov edx, 0xb
jmp 0x305c8b
mov edx, 9
jmp 0x305c8b
mov edx, 7
jmp 0x305c8b
mov edx, 3
jmp 0x305c8b
mov edx, 4
jmp 0x305c8b
mov edx, 0xe
jmp 0x305c8b
mov edx, 2
mov edi, dword [esp + 0x50]
mov ebx, dword [edi + 0x184]
push ebx
push 0
push 0
push 0
push 0
push 0
push ebp
push 0
push esi
push ecx
mov ecx, dword [esp + 0x74]
push eax
push edx
push 0x25
push edi
push ecx
call fcn.00303f20
mov ebx, eax
jmp 0x305cbc
mov edi, dword [esp + 0x50]
test byte [esi + 0xf], 8
je case.0x305845.6
mov eax, dword [esi + 8]
imul eax, dword [esp + 0x58]
mov edx, dword [esp + 0x54]
mov ecx, dword [esp + 0x4c]
push ebp
push edx
push eax
add esi, 4
push esi
push ebx
push edi
push ecx
call fcn.003054c0
pop edi
pop esi
pop ebp
mov ebx, eax
pop ebx
add esp, 0x38
ret 0x14
test byte [esi + 0xf], 8
mov edi, dword [esp + 0x4c]
je 0x305df6
mov eax, dword [edi + 0xe0]
cmp eax, 1
je 0x305d29
cmp eax, 3
jne 0x305d20
mov ecx, dword [esi + 4]
and ecx, 0x1f000000
cmp ecx, 0x2000000
je 0x305d29
cmp eax, 2
jne 0x305df6
push esi
push ebp
sar edx, 8
push edx
mov edx, dword [esp + 0x5c]
push edx
push edi
lea edx, [esp + 0x24]
xor eax, eax
call fcn.00302c50
mov eax, dword [edi]
mov eax, dword [eax + 0x28]
lea ebx, [esp + 0x10]
call fcn.002be4b0
mov ecx, eax
mov eax, edi
call fcn.00304df0
mov edx, eax
test edx, edx
jne 0x305d7a
push eax
push eax
push eax
push eax
push eax
push eax
push ebp
push eax
push esi
push ecx
mov ecx, dword [esp + 0x78]
push 4
push 2
push 0x26
push ecx
push edi
call fcn.00303f20
mov edx, eax
mov eax, dword [esp + 0x50]
mov ebx, dword [eax + 0x3c]
mov eax, ebx
and eax, 0x3c00
jne 0x305d97
cmp dword [edi + 0xe0], 3
jne 0x305d97
xor ecx, ecx
jmp 0x305d9d
mov ecx, dword [esi + 8]
shl ecx, 4
cmp word [ebp + 4], 0x74
jne 0x305dab
mov eax, 2
jmp 0x305dd7
test eax, eax
je 0x305dc0
mov eax, dword [esi]
sar eax, 8
test bh, 0x10
je 0x305dc2
and eax, 0xff
jmp 0x305dc2
xor eax, eax
mov ebx, dword [esi + 8]
add ebx, eax
mov eax, dword [esp + 0x50]
mov eax, dword [eax + 0x1c]
movzx eax, byte [eax + ebx*4]
call fcn.00303d80
push ebp
push eax
push ecx
mov ecx, dword [esp + 0x5c]
add esi, 4
push esi
push edx
push ecx
push edi
call fcn.003054c0
pop edi
pop esi
pop ebp
mov ebx, eax
pop ebx
add esp, 0x38
ret 0x14
push esi
push ebp
sar edx, 8
push edx
mov edx, dword [esp + 0x5c]
push edx
push edi
lea edx, [esp + 0x24]
xor eax, eax
call fcn.00302c50
mov eax, dword [edi]
mov eax, dword [eax + 0x28]
lea ebx, [esp + 0x10]
call fcn.002be4b0
mov ecx, eax
mov eax, edi
call fcn.00304df0
mov ebx, eax
test ebx, ebx
jne case.0x305845.6
push eax
push eax
push eax
push eax
push eax
push eax
push ebp
push eax
push esi
push ecx
mov ecx, dword [esp + 0x78]
push 4
push 2
push 0x26
push ecx
push edi
call fcn.00303f20
mov ebx, eax
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x38
ret 0x14