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

Disassembly:
sub esp, 0x18
push ebx
xor ebx, ebx
push esi
mov dword [esp + 0x10], ebx
mov dword [edi + 0x78], ebx
call fcn.301f4200
add esp, 4
cmp eax, 7
mov dword [edi + 0x1cc], eax
ja 0x3021a3a2
mov ecx, eax
mov eax, dword [esp + 0x20]
mov edx, 1
shl edx, cl
cmp dword [eax + 0x18], ebx
mov dword [esp + 0x14], edx
je 0x3021a180
push esi
call fcn.301f4200
add esp, 4
cmp eax, 7
mov dword [edi + 0x1d0], eax
ja 0x3021a3a2
mov edx, 1
mov ecx, eax
shl edx, cl
mov dword [esp + 0xc], edx
push ebp
mov ebp, 0xea
lea ecx, [edi + 0x3c]
mov dword [esp + 8], ebp
mov dword [esp + 0xc], ecx
mov edx, dword [esp + 0xc]
mov eax, dword [edx]
xor ebx, ebx
test eax, eax
mov dword [esp + 0x14], ebx
jl 0x3021a36b
mov ecx, dword [esi + 0xc]
test ecx, ecx
jl 0x3021a1ce
mov eax, dword [esi + 4]
movzx edx, byte [eax + 1]
mov dh, byte [eax]
add eax, 2
mov dword [esi + 4], eax
mov eax, dword [esi + 0xc]
shl edx, cl
mov ecx, dword [esi + 0x10]
or ecx, edx
add eax, 0xfffffff0
mov dword [esi + 0x10], ecx
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 0xc]
mov eax, ecx
add ecx, ecx
shr eax, 0x1f
inc edx
test eax, eax
mov dword [esi + 0x10], ecx
mov dword [esi + 0xc], edx
je 0x3021a24c
push esi
call fcn.301f40e0
lea edx, [ebx + ebp]
lea ecx, [edi + edx*2]
add esp, 4
cmp ax, 0x7f
mov dword [esp + 0x1c], ecx
mov word [ecx], ax
jg 0x3021a39a
cmp ax, 0xff80
jl 0x3021a39a
push esi
call fcn.301f40e0
add ebp, ebx
add esp, 4
cmp ax, 0x7f
mov word [edi + ebp*2 + 0x40], ax
jg 0x3021a39a
cmp ax, 0xff80
jl 0x3021a39a
mov ecx, dword [esp + 0x1c]
movsx edx, word [ecx]
cmp edx, dword [esp + 0x18]
jne 0x3021a246
test ax, ax
je 0x3021a261
or dword [edi + 0x78], 1
jmp 0x3021a261
mov cx, word [esp + 0x18]
lea eax, [ebx + ebp]
add ebp, ebx
mov word [edi + eax*2], cx
mov word [edi + ebp*2 + 0x40], 0
mov ebp, dword [esi + 0xc]
test ebp, ebp
jl 0x3021a289
mov eax, dword [esi + 4]
movzx edx, byte [eax + 1]
mov dh, byte [eax]
mov ecx, ebp
add eax, 2
mov dword [esi + 4], eax
shl edx, cl
mov ecx, dword [esi + 0x10]
or ecx, edx
add ebp, 0xfffffff0
mov dword [esi + 0x10], ecx
mov dword [esi + 0xc], ebp
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 0xc]
mov eax, ecx
add ecx, ecx
shr eax, 0x1f
inc edx
test eax, eax
mov dword [esi + 0xc], edx
mov edx, dword [esp + 8]
mov dword [esi + 0x10], ecx
je 0x3021a330
mov eax, dword [esp + 0x14]
lea eax, [edx + eax - 0xea]
xor ebx, ebx
mov dword [esp + 0x1c], eax
lea ebp, [edi + eax*4 + 0x254]
push esi
call fcn.301f40e0
add esp, 4
cmp ax, 0x7f
mov word [ebp], ax
jg 0x3021a39a
cmp ax, 0xff80
jl 0x3021a39a
push esi
call fcn.301f40e0
mov ecx, dword [esp + 0x20]
add esp, 4
cmp ax, 0x7f
lea edx, [ebx + ecx*2 + 0x16a]
mov word [edi + edx*2], ax
jg 0x3021a39a
cmp ax, 0xff80
jl 0x3021a39a
movsx ecx, word [ebp]
cmp ecx, dword [esp + 0x10]
jne 0x3021a31d
test ax, ax
je 0x3021a321
or dword [edi + 0x78], 2
inc ebx
add ebp, 2
cmp ebx, 2
jl 0x3021a2c1
mov ebx, dword [esp + 0x14]
jmp 0x3021a354
add edx, ebx
lea eax, [edi + edx*4 - 0xd4]
mov ecx, 2
mov edi, edi
mov dx, word [esp + 0x10]
mov word [eax - 0x80], dx
mov word [eax], 0
add eax, 2
dec ecx
jne 0x3021a340
mov eax, dword [esp + 0xc]
mov ecx, dword [eax]
mov ebp, dword [esp + 8]
inc ebx
cmp ebx, ecx
mov dword [esp + 0x14], ebx
jle 0x3021a1a5
cmp dword [edi + 8], 1
jne 0x3021a38f
mov edx, dword [esp + 0xc]
add ebp, 0x10
add edx, 4
cmp ebp, 0x10a
mov dword [esp + 0xc], edx
mov dword [esp + 8], ebp
jl 0x3021a191
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret
xor eax, eax
pop ebx
add esp, 0x18
ret