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

Disassembly:
sub esp, 0x844
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x2c], esi
cmp dword [esi], 4
jne 0x422831
mov edi, dword [esi + 0x7c]
sar edi, 2
mov dword [esp + 0x30], edi
jmp 0x42283c
mov eax, dword [esi + 0x7c]
sar eax, 1
mov dword [esp + 0x30], eax
mov edi, eax
push edi
mov ecx, esi
call fcn.00423040
mov ebx, dword [esi + 0x80]
xor ecx, ecx
test ebx, ebx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], 0xffff8300
mov dword [esp + 0x20], edi
mov dword [esp + 0x10], esi
mov dword [esi + 0x80], ecx
je 0x422e12
jmp 0x422878
mov ecx, dword [esp + 0x14]
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x422d19
mov eax, dword [esi]
cmp eax, 4
mov eax, dword [ebx]
jne 0x4228af
mov esi, eax
and eax, 3
mov edi, eax
mov eax, dword [ebx + 4]
mov ebp, eax
sar esi, 2
sar ebp, 2
and eax, 3
mov dword [esp + 0x44], esi
mov dword [esp + 0x28], ebp
mov dword [esp + 0x50], eax
jmp 0x4228d4
mov edx, eax
and eax, 1
sar edx, 1
mov edi, eax
mov eax, dword [ebx + 4]
mov dword [esp + 0x44], edx
mov edx, eax
mov esi, dword [esp + 0x44]
sar edx, 1
and eax, 1
mov dword [esp + 0x28], edx
mov dword [esp + 0x50], eax
mov ebp, edx
cmp esi, ebp
mov dword [esp + 0x24], 0
jne 0x42298e
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x34]
push eax
push ecx
push esi
mov ecx, ebx
call fcn.00421390
mov eax, dword [esp + 0x50]
sub eax, edi
mov edi, eax
mov eax, dword [esp + 0x1c]
cmp eax, esi
je 0x422969
xor ebp, ebp
cmp word [esp + 0x1a], bp
je 0x42295d
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx]
cmp edx, 2
mov edx, dword [esp + 0x14]
jne 0x422934
shr edx, 2
and edx, 0xff00ff
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x18]
shr edx, 2
jmp 0x422948
shr edx, 4
and edx, 0xff00ff
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x18]
shr edx, 4
and edx, 0xff00ff
mov dword [esp + 0x18], edx
lea edx, [esp + 0x14]
push edx
push eax
call fcn.00422e80
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], esi
mov eax, edi
imul edi, dword [esp + 0x38]
imul eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x14]
add ecx, eax
mov eax, dword [esp + 0x18]
add eax, edi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
jmp 0x422d15
test edi, edi
je 0x422a4f
mov edx, dword [esp + 0x30]
lea ecx, [esp + 0x34]
push ecx
push edx
push esi
mov ecx, ebx
call fcn.00421390
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x24], 1
mov ebp, dword [eax]
mov eax, dword [esp + 0x1c]
sub ebp, edi
cmp eax, esi
je 0x422a20
cmp word [esp + 0x1a], 0
je 0x422a16
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx]
cmp edx, 2
mov edx, dword [esp + 0x14]
jne 0x4229ed
shr edx, 2
and edx, 0xff00ff
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x18]
shr edx, 2
jmp 0x422a01
shr edx, 4
and edx, 0xff00ff
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x18]
shr edx, 4
and edx, 0xff00ff
mov dword [esp + 0x18], edx
lea edx, [esp + 0x14]
push edx
push eax
call fcn.00422e80
xor ecx, ecx
xor edi, edi
mov dword [esp + 0x1c], esi
jmp 0x422a28
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov edx, dword [esp + 0x34]
mov eax, ebp
imul eax, edx
add ecx, eax
mov eax, dword [esp + 0x38]
imul ebp, eax
add edi, ebp
mov ebp, dword [esp + 0x28]
inc esi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edi
mov dword [esp + 0x44], esi
jmp 0x422a5b
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x34]
mov edi, dword [esp + 0x18]
cmp esi, ebp
jge 0x422bea
mov cl, byte [ebx + 0x11]
test cl, cl
je 0x422aab
mov ecx, dword [esp + 0x2c]
mov edi, dword [ebx + 0xc]
cmp edi, dword [ecx]
jne 0x422aaf
mov al, byte [ebx + 0x12]
test al, al
je 0x422a96
xor edx, edx
lea eax, [ebx + 0x18]
mov dl, byte [ebx + 0x13]
push edx
push eax
push ebp
push esi
call fcn.00421f40
mov ecx, dword [esp + 0x14]
jmp 0x422be6
mov eax, dword [ebx + 0x18]
push ebp
push esi
push eax
call dword [eax + 0x18]
mov ecx, dword [esp + 0x20]
add esp, 0xc
jmp 0x422be6
mov ecx, dword [esp + 0x2c]
mov ecx, dword [ecx]
mov edi, esi
sar ecx, 1
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], ecx
jmp 0x422acf
mov edi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x34]
lea ebp, [edi + 0x100]
cmp dword [esp + 0x28], ebp
jge 0x422adf
mov ebp, dword [esp + 0x28]
cmp byte [ebx + 0x10], 0
je 0x422b2f
cmp edi, ebp
lea esi, [esp + 0x54]
jge 0x422b9b
mov ecx, dword [esp + 0x30]
push esi
push ecx
push edi
mov ecx, ebx
call fcn.00421390
mov edx, dword [esi]
mov ecx, dword [esp + 0x40]
mov eax, dword [esi + 4]
add esi, 8
shr edx, cl
shr eax, cl
and edx, 0xff00ff
and eax, 0xff00ff
mov dword [esi - 8], edx
mov dword [esi - 4], eax
inc edi
cmp edi, ebp
jl 0x422af1
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x3c]
jmp 0x422b9f
cmp dword [esp + 0x24], 0
jne 0x422b60
mov edx, dword [esp + 0x30]
lea ecx, [esp + 0x34]
push ecx
push edx
push esi
mov ecx, ebx
call fcn.00421390
mov edi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x34]
mov dword [esp + 0x24], 1
shr eax, cl
shr edx, cl
lea ecx, [edi + 1]
and eax, 0xff00ff
and edx, 0xff00ff
mov dword [esp + 0x58], eax
cmp ecx, ebp
mov dword [esp + 0x54], edx
lea eax, [esp + 0x5c]
jge 0x422b9f
mov edx, ebp
sub edx, ecx
mov ecx, dword [esp + 0x54]
mov dword [eax], ecx
mov ecx, dword [esp + 0x58]
mov dword [eax + 4], ecx
add eax, 8
dec edx
jne 0x422b86
jmp 0x422b9f
mov esi, dword [esp + 0x44]
mov ecx, dword [esp + 0x2c]
mov edx, dword [ebx + 0xc]
cmp edx, dword [ecx]
jne 0x422bc4
mov al, byte [ebx + 0x12]
test al, al
jne 0x422bc4
lea eax, [esp + 0x54]
push eax
push ebp
push edi
push ecx
call dword [ecx + 0x128]
add esp, 0x10
jmp 0x422bd0
lea edx, [esp + 0x54]
push edx
push ebp
push edi
call fcn.00420140
mov eax, dword [esp + 0x28]
mov dword [esp + 0x3c], ebp
cmp ebp, eax
jl 0x422abf
mov ecx, dword [esp + 0x14]
mov ebp, eax
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x50]
test eax, eax
je 0x422d15
mov al, byte [ebx + 0x10]
test al, al
jne 0x422c05
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x422c1f
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x34]
push eax
push ecx
push ebp
mov ecx, ebx
call fcn.00421390
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
cmp eax, ebp
je 0x422cf7
cmp word [esp + 0x1a], 0
je 0x422ceb
mov edx, dword [esp + 0x10]
cmp dword [edx], 2
jne 0x422c52
shr ecx, 2
and ecx, 0xff00ff
mov dword [esp + 0x14], ecx
shr edi, 2
jmp 0x422c62
shr ecx, 4
and ecx, 0xff00ff
mov dword [esp + 0x14], ecx
shr edi, 4
and edi, 0xff00ff
mov dword [esp + 0x3c], eax
mov dword [esp + 0x18], edi
cmp word [esp + 0x1a], 0xff
mov edi, edx
jne 0x422c91
lea ecx, [esp + 0x14]
push ecx
lea ecx, [eax + 1]
push ecx
push eax
push edx
call dword [edx + 0x128]
add esp, 0x10
jmp 0x422ceb
lea ecx, [esp + 0x48]
lea esi, [eax + 1]
push ecx
push esi
push eax
push edx
call dword [edx + 0x130]
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x50], edx
lea ecx, [esp + 0x34]
mov dword [esp + 0x34], eax
lea edx, [esp + 0x50]
push ecx
lea eax, [esp + 0x28]
push edx
push eax
call fcn.00422e20
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x40]
lea eax, [esp + 0x64]
mov dword [esp + 0x64], ecx
mov ecx, dword [esp + 0x58]
push eax
push esi
push ecx
push edi
mov dword [esp + 0x78], edx
call dword [edi + 0x128]
add esp, 0x2c
xor ecx, ecx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], ecx
mov edi, ecx
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x50]
imul edx, eax
add ecx, edx
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x38]
imul ecx, eax
add edi, ecx
mov dword [esp + 0x18], edi
mov esi, dword [esp + 0x2c]
mov edi, dword [ebx + 8]
push ebx
lea ecx, [esi + 0xa8]
call fcn.00416400
test edi, edi
mov ebx, edi
jne 0x422874
cmp word [esp + 0x1a], di
je 0x422e12
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
cmp dword [eax], 2
jne 0x422d60
mov ecx, dword [esp + 0x18]
shr edx, 2
and edx, 0xff00ff
mov dword [esp + 0x14], edx
shr ecx, 2
jmp 0x422d74
mov ecx, dword [esp + 0x18]
shr edx, 4
and edx, 0xff00ff
mov dword [esp + 0x14], edx
shr ecx, 4
and ecx, 0xff00ff
mov edi, eax
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x1c]
cmp word [esp + 0x1a], 0xff
mov ebx, ecx
jne 0x422dae
lea edx, [esp + 0x14]
push edx
lea edx, [ecx + 1]
push edx
push ecx
push eax
call dword [eax + 0x128]
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x844
ret
lea edx, [esp + 0x48]
lea esi, [ecx + 1]
push edx
push esi
push ecx
push eax
call dword [eax + 0x130]
mov ecx, dword [esp + 0x2a]
mov eax, 0x100
and ecx, 0xffff
mov ebp, dword [esp + 0x28]
sub eax, ecx
mov ecx, dword [esp + 0x24]
mov edx, eax
imul eax, dword [esp + 0x5c]
imul edx, dword [esp + 0x58]
shr eax, 8
add eax, ebp
and eax, 0xff00ff
mov dword [esp + 0x5c], eax
lea eax, [esp + 0x58]
shr edx, 8
add edx, ecx
push eax
push esi
and edx, 0xff00ff
push ebx
push edi
mov dword [esp + 0x68], edx
call dword [edi + 0x128]
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x844
ret