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

Disassembly:
sub esp, 0x478
push ebx
push esi
lea edx, [esp + 0x5c]
mov dword [esp + 0x78], 0xff
mov esi, ecx
xor ebx, ebx
call fcn.004695c3
test eax, eax
je 0x46a306
mov eax, dword [esi + 4]
mov dword [esp + 0x44], eax
cdq
push ebp
mov ebp, eax
mov eax, 0x1000000
xor ebp, edx
sub ebp, edx
mov dword [esi + 4], ebp
cmp ebp, eax
ja 0x4698ef
mov ecx, dword [esi]
mov dword [esp + 0x14], ecx
cmp ecx, eax
jbe 0x469908
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov dword [eax + 0xc], str.too_large
xor eax, eax
jmp 0x46a305
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x80]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x60]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], edx
push edi
mov edi, dword [esp + 0x68]
mov dword [esp + 0x44], edi
cmp eax, 0xc
jne 0x469971
cmp edx, 0x18
jge 0x469985
mov eax, edi
sub eax, dword [esp + 0x10]
sub eax, 0x18
push 3
pop ebx
cdq
idiv ebx
mov ebx, eax
jmp 0x469981
cmp edx, 0x10
jge 0x469985
mov ebx, edi
sub ebx, dword [esp + 0x10]
sub ebx, eax
sar ebx, 2
test ebx, ebx
jne 0x4699cd
mov ecx, dword [esi + 0xac]
sub ecx, dword [esi + 0xb4]
add ecx, dword [esi + 0xa8]
lea eax, [ecx - 1]
cmp eax, 0x3ff
ja 0x46a2f0
cmp edi, ecx
jl 0x46a2dc
mov edx, edi
sub edx, ecx
cmp edx, 0x400
jg 0x46a2dc
mov ecx, esi
call fcn.00462217
mov ecx, dword [esi]
mov ebp, dword [esi + 4]
mov dword [esp + 0x18], ecx
cmp dword [esp + 0x1c], 0x18
jne 0x4699e3
cmp dword [esp + 0x14], 0xff000000
jne 0x4699e3
push 3
pop eax
jmp 0x4699f1
xor eax, eax
cmp dword [esp + 0x14], eax
push 3
setne al
pop edx
add eax, edx
push 0
push ebp
mov edx, ecx
mov dword [esi + 8], eax
push 4
pop ecx
call fcn.00461cea
pop ecx
pop ecx
test eax, eax
jne 0x469a1e
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov dword [eax + 0xc], str.too_large
jmp 0x46a302
mov edx, dword [esp + 0x18]
push 0
push ebp
push 4
pop ecx
call fcn.00461dab
mov ebp, eax
mov dword [esp + 0x60], ebp
pop ecx
pop ecx
test ebp, ebp
jne 0x469a50
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov dword [eax + 0xc], str.outofmem
jmp 0x46a302
cmp dword [esp + 0x1c], 0x10
jge 0x469ea3
xor edi, edi
mov dword [esp + 0x48], edi
test ebx, ebx
je 0x469e84
cmp ebx, 0x100
jg 0x469e84
xor ecx, ecx
mov dword [esp + 0x14], ecx
test ebx, ebx
jle 0x469ba1
mov edi, dword [esp + 0x20]
lea ebp, [esi + 0x20]
mov eax, dword [esi + 0xac]
cmp eax, dword [esi + 0xb0]
jae 0x469aa3
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x469aca
lea ebp, [esi + 0x20]
cmp dword [ebp], 0
je 0x469ac8
mov ecx, esi
call fcn.004621bc
mov eax, dword [esi + 0xac]
mov ecx, dword [esp + 0x14]
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x469aca
xor dl, dl
mov dword [esp + 0x34], ebp
mov byte [esp + ecx*4 + 0x8a], dl
cmp eax, dword [esi + 0xb0]
jae 0x469ae8
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x469b0c
cmp dword [ebp], 0
je 0x469b0a
mov ecx, esi
call fcn.004621bc
mov eax, dword [esi + 0xac]
mov ecx, dword [esp + 0x14]
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x469b0c
xor dl, dl
mov byte [esp + ecx*4 + 0x89], dl
cmp eax, dword [esi + 0xb0]
jae 0x469b29
mov dl, byte [eax]
lea ebp, [esi + 0x20]
inc eax
mov dword [esi + 0xac], eax
jmp 0x469b4d
cmp dword [ebp], 0
je 0x469b4b
mov ecx, esi
call fcn.004621bc
mov eax, dword [esi + 0xac]
mov ecx, dword [esp + 0x14]
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x469b4d
xor dl, dl
mov byte [esp + ecx*4 + 0x88], dl
cmp edi, 0xc
je 0x469b84
cmp eax, dword [esi + 0xb0]
jae 0x469b6a
inc eax
mov dword [esi + 0xac], eax
jmp 0x469b84
mov eax, dword [esp + 0x34]
cmp dword [eax], 0
je 0x469b84
mov ecx, esi
call fcn.004621bc
inc dword [esi + 0xac]
mov ecx, dword [esp + 0x14]
mov byte [esp + ecx*4 + 0x8b], 0xff
inc ecx
mov dword [esp + 0x14], ecx
cmp ecx, ebx
jl 0x469a8a
mov edi, dword [esp + 0x48]
mov ebp, dword [esp + 0x58]
xor eax, eax
mov ecx, esi
cmp dword [esp + 0x20], 0xc
push 3
setne al
pop edx
add eax, edx
mov edx, dword [esp + 0x44]
imul eax, ebx
sub edx, eax
sub edx, dword [esp + 0x10]
sub edx, dword [esp + 0x20]
call fcn.00462217
mov eax, dword [esp + 0x1c]
cmp eax, 1
jne 0x469bdb
mov ebx, dword [esi]
add ebx, 7
shr ebx, 3
jmp 0x469bf2
cmp eax, 4
jne 0x469be7
mov ebx, dword [esi]
inc ebx
shr ebx, 1
jmp 0x469bf2
cmp eax, 8
jne 0x469e65
mov ebx, dword [esi]
push 3
neg ebx
pop ecx
and ebx, ecx
mov ecx, dword [esi + 4]
mov dword [esp + 0x2c], ebx
mov edx, ecx
cmp eax, 1
jne 0x469d2f
and dword [esp + 0x30], 0
test ecx, ecx
jle 0x46a219
mov eax, dword [esi + 0xac]
mov dword [esp + 0x34], 7
cmp eax, dword [esi + 0xb0]
jae 0x469c39
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x469c50
cmp dword [esi + 0x20], 0
je 0x469c4e
mov ecx, esi
call fcn.004621bc
mov eax, dword [esi + 0xac]
jmp 0x469c2e
xor cl, cl
and dword [esp + 0x10], 0
cmp dword [esi], 0
movzx eax, cl
mov dword [esp + 0x18], eax
jle 0x469d0b
mov ebx, dword [esp + 0x34]
mov edx, eax
mov ecx, ebx
sar edx, cl
and edx, 1
mov al, byte [esp + edx*4 + 0x88]
mov byte [edi + ebp], al
mov al, byte [esp + edx*4 + 0x89]
mov byte [edi + ebp + 1], al
mov al, byte [esp + edx*4 + 0x8a]
mov byte [edi + ebp + 2], al
mov eax, dword [esp + 0x10]
mov byte [edi + ebp + 3], 0xff
add edi, 4
mov ecx, dword [esi]
inc eax
mov edx, eax
mov dword [esp + 0x10], edx
cmp eax, ecx
je 0x469d07
sub ebx, 1
jns 0x469cfb
mov eax, dword [esi + 0xac]
push 7
pop ebx
cmp eax, dword [esi + 0xb0]
jae 0x469ccc
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x469cee
cmp dword [esi + 0x20], 0
je 0x469cec
mov ecx, esi
call fcn.004621bc
mov eax, dword [esi + 0xac]
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
mov ecx, dword [esi]
jmp 0x469cee
xor dl, dl
movzx eax, dl
mov edx, dword [esp + 0x10]
mov dword [esp + 0x18], eax
jmp 0x469cff
mov eax, dword [esp + 0x18]
cmp edx, ecx
jl 0x469c69
mov ebx, dword [esp + 0x2c]
mov edx, ebx
mov ecx, esi
call fcn.00462217
mov eax, dword [esp + 0x30]
mov ecx, dword [esi + 4]
inc eax
mov dword [esp + 0x30], eax
mov edx, ecx
cmp eax, ecx
jl 0x469c18
jmp 0x46a219
and dword [esp + 0x18], 0
test ecx, ecx
jle 0x46a219
and dword [esp + 0x10], 0
cmp dword [esi], 0
jle 0x469e41
mov ebx, dword [esp + 0x1c]
mov eax, dword [esi + 0xac]
cmp eax, dword [esi + 0xb0]
jae 0x469d67
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x469d7e
cmp dword [esi + 0x20], 0
je 0x469d7c
mov ecx, esi
call fcn.004621bc
mov eax, dword [esi + 0xac]
jmp 0x469d5c
xor cl, cl
xor edx, edx
movzx ecx, cl
cmp ebx, 4
jne 0x469d90
mov edx, ecx
and edx, 0xf
shr ecx, 4
mov al, byte [esp + ecx*4 + 0x88]
mov byte [edi + ebp], al
mov al, byte [esp + ecx*4 + 0x89]
mov byte [edi + ebp + 1], al
mov al, byte [esp + ecx*4 + 0x8a]
mov ecx, dword [esp + 0x10]
mov byte [edi + ebp + 2], al
mov byte [edi + ebp + 3], 0xff
add edi, 4
lea eax, [ecx + 1]
cmp eax, dword [esi]
je 0x469e3d
cmp ebx, 8
jne 0x469e06
mov eax, dword [esi + 0xac]
cmp eax, dword [esi + 0xb0]
jae 0x469de1
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x469dff
push 0x20
pop edx
mov eax, esi
mov ecx, edx
cmp dword [eax + ecx], 0
je 0x469dfd
mov ecx, esi
call fcn.004621bc
mov eax, dword [esi + 0xac]
jmp 0x469dd6
xor cl, cl
movzx edx, cl
mov ecx, dword [esp + 0x10]
mov al, byte [esp + edx*4 + 0x88]
add ecx, 2
mov byte [edi + ebp], al
mov al, byte [esp + edx*4 + 0x89]
mov byte [edi + ebp + 1], al
mov al, byte [esp + edx*4 + 0x8a]
mov byte [edi + ebp + 2], al
mov byte [edi + ebp + 3], 0xff
add edi, 4
mov dword [esp + 0x10], ecx
cmp ecx, dword [esi]
jl 0x469d4e
mov ebx, dword [esp + 0x2c]
mov edx, ebx
mov ecx, esi
call fcn.00462217
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 4]
inc eax
mov dword [esp + 0x18], eax
mov edx, ecx
cmp eax, ecx
jl 0x469d3c
jmp 0x46a219
push ebp
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword fs:[0x2c]
pop ecx
mov eax, dword [eax]
mov dword [eax + 0xc], str.bad_bpp
jmp 0x46a302
push ebp
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword fs:[0x2c]
pop ecx
mov eax, dword [eax]
mov dword [eax + 0xc], str.invalid
jmp 0x46a302
sub edi, dword [esp + 0x10]
xor eax, eax
sub edi, dword [esp + 0x20]
mov ebx, eax
mov edx, edi
mov dword [esp + 0x50], eax
mov ecx, esi
mov dword [esp + 0x54], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x24], eax
call fcn.00462217
mov eax, dword [esp + 0x1c]
cmp eax, 0x18
jne 0x469eee
imul ecx, dword [esi], 3
jmp 0x469efb
cmp eax, 0x10
jne 0x469ef9
mov ecx, dword [esi]
add ecx, ecx
jmp 0x469efb
xor ecx, ecx
push 3
pop edx
neg ecx
and ecx, edx
mov dword [esp + 0x60], ecx
push 0x20
pop edi
cmp eax, 0x18
jne 0x469f1b
mov dword [esp + 0x24], 1
jmp 0x46a019
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x28]
cmp eax, edi
jne 0x469f58
cmp edx, 0xff
jne 0x469f58
cmp dword [esp + 0x38], 0xff00
jne 0x469f58
cmp ecx, 0xff0000
jne 0x469f58
cmp dword [esp + 0x14], 0xff000000
jne 0x469f78
mov dword [esp + 0x24], 2
jmp 0x46a019
mov eax, ebx
mov dword [esp + 0x24], eax
test ecx, ecx
je 0x46a2c0
cmp dword [esp + 0x38], eax
je 0x46a2c0
test edx, edx
je 0x46a2c0
call fcn.00469493
mov ecx, dword [esp + 0x28]
push 7
pop ebx
sub eax, ebx
mov dword [esp + 0x50], eax
call fcn.004694f1
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x2c], eax
call fcn.00469493
mov ecx, dword [esp + 0x38]
sub eax, ebx
mov dword [esp + 0x54], eax
call fcn.004694f1
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x30], eax
call fcn.00469493
mov ecx, dword [esp + 0x3c]
sub eax, ebx
mov dword [esp + 0x44], eax
call fcn.004694f1
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x18], eax
call fcn.00469493
mov ecx, dword [esp + 0x14]
sub eax, ebx
mov dword [esp + 0x34], eax
call fcn.004694f1
cmp dword [esp + 0x2c], 8
mov dword [esp + 0x48], eax
jg 0x46a2c0
cmp dword [esp + 0x30], 8
jg 0x46a2c0
cmp dword [esp + 0x18], 8
jg 0x46a2c0
cmp eax, 8
jg 0x46a2c0
mov ebx, dword [esp + 0x5c]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esi + 4]
mov edx, ecx
and dword [esp + 0x10], 0
test ecx, ecx
jle 0x46a219
and dword [esp + 0x20], 0
cmp dword [esp + 0x24], 0
je 0x46a14b
cmp dword [esi], 0
jle 0x46a1f4
mov eax, dword [esi + 0xac]
cmp eax, dword [esi + 0xb0]
jae 0x46a05d
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x46a074
cmp dword [esi + 0x20], 0
je 0x46a072
mov ecx, esi
call fcn.004621bc
mov eax, dword [esi + 0xac]
jmp 0x46a052
xor cl, cl
mov eax, esi
mov byte [ebx + ebp + 2], cl
mov edx, edi
lea edi, [eax + edx]
mov eax, dword [esi + 0xac]
cmp eax, dword [esi + 0xb0]
jae 0x46a098
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x46a0b1
lea edi, [esi + 0x20]
cmp dword [edi], 0
je 0x46a0af
mov ecx, esi
call fcn.004621bc
mov eax, dword [esi + 0xac]
jmp 0x46a08d
xor cl, cl
mov byte [ebx + ebp + 1], cl
mov eax, dword [esi + 0xac]
cmp eax, dword [esi + 0xb0]
jae 0x46a0ce
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x46a0e4
cmp dword [edi], 0
je 0x46a0e2
mov ecx, esi
call fcn.004621bc
mov eax, dword [esi + 0xac]
jmp 0x46a0c3
xor cl, cl
push 3
pop eax
mov byte [ebx + ebp], cl
add ebx, eax
cmp dword [esp + 0x24], 2
jne 0x46a124
mov eax, dword [esi + 0xac]
cmp eax, dword [esi + 0xb0]
jae 0x46a10c
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x46a127
cmp dword [edi], 0
je 0x46a120
mov ecx, esi
call fcn.004621bc
mov eax, dword [esi + 0xac]
jmp 0x46a101
xor cl, cl
jmp 0x46a127
or cl, 0xff
movzx eax, cl
or dword [esp + 0x40], eax
mov byte [ebx + ebp], cl
inc ebx
mov ecx, dword [esp + 0x20]
inc ecx
push 0x20
mov dword [esp + 0x24], ecx
pop edi
cmp ecx, dword [esi]
jl 0x46a044
jmp 0x46a1f1
cmp dword [esi], 0
jle 0x46a1f4
mov ecx, esi
cmp eax, 0x10
jne 0x46a162
call fcn.00462391
jmp 0x46a167
call fcn.00462409
push dword [esp + 0x2c]
mov edx, dword [esp + 0x54]
mov edi, eax
mov ecx, edi
and ecx, dword [esp + 0x2c]
call fcn.0046952f
push dword [esp + 0x34]
mov edx, dword [esp + 0x5c]
mov ecx, edi
and ecx, dword [esp + 0x40]
mov byte [ebx + ebp], al
call fcn.0046952f
push dword [esp + 0x20]
mov edx, dword [esp + 0x50]
mov ecx, edi
and ecx, dword [esp + 0x48]
mov byte [ebx + ebp + 1], al
call fcn.0046952f
mov byte [ebx + ebp + 2], al
add esp, 0xc
mov eax, dword [esp + 0x14]
test eax, eax
je 0x46a1cc
push dword [esp + 0x48]
mov edx, dword [esp + 0x38]
and edi, eax
mov ecx, edi
call fcn.0046952f
pop ecx
jmp 0x46a1d1
mov eax, 0xff
or dword [esp + 0x40], eax
mov ecx, dword [esp + 0x20]
mov byte [ebx + ebp + 3], al
add ebx, 4
mov eax, dword [esp + 0x1c]
inc ecx
mov dword [esp + 0x20], ecx
cmp ecx, dword [esi]
jl 0x46a154
push 0x20
pop edi
mov edx, dword [esp + 0x60]
mov ecx, esi
call fcn.00462217
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 4]
inc eax
mov dword [esp + 0x10], eax
cmp eax, ecx
mov eax, dword [esp + 0x1c]
mov edx, ecx
jl 0x46a02b
cmp dword [esp + 0x40], 0
jne 0x46a23c
mov eax, dword [esi]
imul eax, ecx
lea eax, [eax*4 - 1]
test eax, eax
js 0x46a23c
mov byte [eax + ebp], 0xff
sub eax, 4
jns 0x46a230
mov edx, dword [esi + 4]
cmp dword [esp + 0x4c], 0
jle 0x46a2a5
xor edi, edi
test edx, 0xfffffffe
jle 0x46a2a5
mov ecx, dword [esi]
sub edx, edi
and dword [esp + 0x4c], 0
mov eax, ecx
imul eax, edi
lea ebx, [eax*4]
mov eax, ecx
add ebx, ebp
shl eax, 2
dec edx
imul edx, ecx
lea edx, [edx*4]
add edx, ebp
test eax, eax
jle 0x46a299
mov ebp, dword [esp + 0x4c]
sub ebx, edx
mov al, byte [edx]
inc ebp
mov cl, byte [edx + ebx]
mov byte [edx + ebx], al
mov byte [edx], cl
inc edx
mov eax, dword [esi]
shl eax, 2
cmp ebp, eax
jl 0x46a280
mov ebp, dword [esp + 0x58]
mov edx, dword [esi + 4]
inc edi
mov eax, edx
sar eax, 1
cmp edi, eax
jl 0x46a24d
mov eax, dword [esi]
mov dword [0x5657bc], eax
mov eax, dword [esi + 4]
mov dword [0x5657b4], eax
mov eax, dword [esi + 8]
mov dword [0x5657c0], eax
mov eax, ebp
jmp 0x46a304
push ebp
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword fs:[0x2c]
pop ecx
mov eax, dword [eax]
mov dword [eax + 0xc], str.bad_masks
jmp 0x46a302
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov dword [eax + 0xc], str.bad_offset
jmp 0x46a302
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov dword [eax + 0xc], str.bad_header
xor eax, eax
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x478
ret