Function at 0x481ef5
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.00481c13
test eax, eax
je 0x482956
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 0x481f3f
mov ecx, dword [esi]
mov dword [esp + 0x14], ecx
cmp ecx, eax
jbe 0x481f58
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov dword [eax + 0xc], str.too_large
xor eax, eax
jmp 0x482955
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 0x481fc1
cmp edx, 0x18
jge 0x481fd5
mov eax, edi
sub eax, dword [esp + 0x10]
sub eax, 0x18
push 3
pop ebx
cdq
idiv ebx
mov ebx, eax
jmp 0x481fd1
cmp edx, 0x10
jge 0x481fd5
mov ebx, edi
sub ebx, dword [esp + 0x10]
sub ebx, eax
sar ebx, 2
test ebx, ebx
jne 0x48201d
mov ecx, dword [esi + 0xac]
sub ecx, dword [esi + 0xb4]
add ecx, dword [esi + 0xa8]
lea eax, [ecx - 1]
cmp eax, 0x3ff
ja 0x482940
cmp edi, ecx
jl 0x48292c
mov edx, edi
sub edx, ecx
cmp edx, 0x400
jg 0x48292c
mov ecx, esi
call fcn.0047a867
mov ecx, dword [esi]
mov ebp, dword [esi + 4]
mov dword [esp + 0x18], ecx
cmp dword [esp + 0x1c], 0x18
jne 0x482033
cmp dword [esp + 0x14], 0xff000000
jne 0x482033
push 3
pop eax
jmp 0x482041
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.0047a33a
pop ecx
pop ecx
test eax, eax
jne 0x48206e
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov dword [eax + 0xc], str.too_large
jmp 0x482952
mov edx, dword [esp + 0x18]
push 0
push ebp
push 4
pop ecx
call fcn.0047a3fb
mov ebp, eax
mov dword [esp + 0x60], ebp
pop ecx
pop ecx
test ebp, ebp
jne 0x4820a0
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov dword [eax + 0xc], str.outofmem
jmp 0x482952
cmp dword [esp + 0x1c], 0x10
jge 0x4824f3
xor edi, edi
mov dword [esp + 0x48], edi
test ebx, ebx
je 0x4824d4
cmp ebx, 0x100
jg 0x4824d4
xor ecx, ecx
mov dword [esp + 0x14], ecx
test ebx, ebx
jle 0x4821f1
mov edi, dword [esp + 0x20]
lea ebp, [esi + 0x20]
mov eax, dword [esi + 0xac]
cmp eax, dword [esi + 0xb0]
jae 0x4820f3
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x48211a
lea ebp, [esi + 0x20]
cmp dword [ebp], 0
je 0x482118
mov ecx, esi
call fcn.0047a80c
mov eax, dword [esi + 0xac]
mov ecx, dword [esp + 0x14]
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x48211a
xor dl, dl
mov dword [esp + 0x34], ebp
mov byte [esp + ecx*4 + 0x8a], dl
cmp eax, dword [esi + 0xb0]
jae 0x482138
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x48215c
cmp dword [ebp], 0
je 0x48215a
mov ecx, esi
call fcn.0047a80c
mov eax, dword [esi + 0xac]
mov ecx, dword [esp + 0x14]
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x48215c
xor dl, dl
mov byte [esp + ecx*4 + 0x89], dl
cmp eax, dword [esi + 0xb0]
jae 0x482179
mov dl, byte [eax]
lea ebp, [esi + 0x20]
inc eax
mov dword [esi + 0xac], eax
jmp 0x48219d
cmp dword [ebp], 0
je 0x48219b
mov ecx, esi
call fcn.0047a80c
mov eax, dword [esi + 0xac]
mov ecx, dword [esp + 0x14]
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x48219d
xor dl, dl
mov byte [esp + ecx*4 + 0x88], dl
cmp edi, 0xc
je 0x4821d4
cmp eax, dword [esi + 0xb0]
jae 0x4821ba
inc eax
mov dword [esi + 0xac], eax
jmp 0x4821d4
mov eax, dword [esp + 0x34]
cmp dword [eax], 0
je 0x4821d4
mov ecx, esi
call fcn.0047a80c
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 0x4820da
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.0047a867
mov eax, dword [esp + 0x1c]
cmp eax, 1
jne 0x48222b
mov ebx, dword [esi]
add ebx, 7
shr ebx, 3
jmp 0x482242
cmp eax, 4
jne 0x482237
mov ebx, dword [esi]
inc ebx
shr ebx, 1
jmp 0x482242
cmp eax, 8
jne 0x4824b5
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 0x48237f
and dword [esp + 0x30], 0
test ecx, ecx
jle 0x482869
mov eax, dword [esi + 0xac]
mov dword [esp + 0x34], 7
cmp eax, dword [esi + 0xb0]
jae 0x482289
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x4822a0
cmp dword [esi + 0x20], 0
je 0x48229e
mov ecx, esi
call fcn.0047a80c
mov eax, dword [esi + 0xac]
jmp 0x48227e
xor cl, cl
and dword [esp + 0x10], 0
cmp dword [esi], 0
movzx eax, cl
mov dword [esp + 0x18], eax
jle 0x48235b
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 0x482357
sub ebx, 1
jns 0x48234b
mov eax, dword [esi + 0xac]
push 7
pop ebx
cmp eax, dword [esi + 0xb0]
jae 0x48231c
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x48233e
cmp dword [esi + 0x20], 0
je 0x48233c
mov ecx, esi
call fcn.0047a80c
mov eax, dword [esi + 0xac]
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
mov ecx, dword [esi]
jmp 0x48233e
xor dl, dl
movzx eax, dl
mov edx, dword [esp + 0x10]
mov dword [esp + 0x18], eax
jmp 0x48234f
mov eax, dword [esp + 0x18]
cmp edx, ecx
jl 0x4822b9
mov ebx, dword [esp + 0x2c]
mov edx, ebx
mov ecx, esi
call fcn.0047a867
mov eax, dword [esp + 0x30]
mov ecx, dword [esi + 4]
inc eax
mov dword [esp + 0x30], eax
mov edx, ecx
cmp eax, ecx
jl 0x482268
jmp 0x482869
and dword [esp + 0x18], 0
test ecx, ecx
jle 0x482869
and dword [esp + 0x10], 0
cmp dword [esi], 0
jle 0x482491
mov ebx, dword [esp + 0x1c]
mov eax, dword [esi + 0xac]
cmp eax, dword [esi + 0xb0]
jae 0x4823b7
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x4823ce
cmp dword [esi + 0x20], 0
je 0x4823cc
mov ecx, esi
call fcn.0047a80c
mov eax, dword [esi + 0xac]
jmp 0x4823ac
xor cl, cl
xor edx, edx
movzx ecx, cl
cmp ebx, 4
jne 0x4823e0
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 0x48248d
cmp ebx, 8
jne 0x482456
mov eax, dword [esi + 0xac]
cmp eax, dword [esi + 0xb0]
jae 0x482431
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x48244f
push 0x20
pop edx
mov eax, esi
mov ecx, edx
cmp dword [eax + ecx], 0
je 0x48244d
mov ecx, esi
call fcn.0047a80c
mov eax, dword [esi + 0xac]
jmp 0x482426
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 0x48239e
mov ebx, dword [esp + 0x2c]
mov edx, ebx
mov ecx, esi
call fcn.0047a867
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 4]
inc eax
mov dword [esp + 0x18], eax
mov edx, ecx
cmp eax, ecx
jl 0x48238c
jmp 0x482869
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 0x482952
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 0x482952
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.0047a867
mov eax, dword [esp + 0x1c]
cmp eax, 0x18
jne 0x48253e
imul ecx, dword [esi], 3
jmp 0x48254b
cmp eax, 0x10
jne 0x482549
mov ecx, dword [esi]
add ecx, ecx
jmp 0x48254b
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 0x48256b
mov dword [esp + 0x24], 1
jmp 0x482669
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x28]
cmp eax, edi
jne 0x4825a8
cmp edx, 0xff
jne 0x4825a8
cmp dword [esp + 0x38], 0xff00
jne 0x4825a8
cmp ecx, 0xff0000
jne 0x4825a8
cmp dword [esp + 0x14], 0xff000000
jne 0x4825c8
mov dword [esp + 0x24], 2
jmp 0x482669
mov eax, ebx
mov dword [esp + 0x24], eax
test ecx, ecx
je 0x482910
cmp dword [esp + 0x38], eax
je 0x482910
test edx, edx
je 0x482910
call fcn.00481ae3
mov ecx, dword [esp + 0x28]
push 7
pop ebx
sub eax, ebx
mov dword [esp + 0x50], eax
call fcn.00481b41
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x2c], eax
call fcn.00481ae3
mov ecx, dword [esp + 0x38]
sub eax, ebx
mov dword [esp + 0x54], eax
call fcn.00481b41
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x30], eax
call fcn.00481ae3
mov ecx, dword [esp + 0x3c]
sub eax, ebx
mov dword [esp + 0x44], eax
call fcn.00481b41
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x18], eax
call fcn.00481ae3
mov ecx, dword [esp + 0x14]
sub eax, ebx
mov dword [esp + 0x34], eax
call fcn.00481b41
cmp dword [esp + 0x2c], 8
mov dword [esp + 0x48], eax
jg 0x482910
cmp dword [esp + 0x30], 8
jg 0x482910
cmp dword [esp + 0x18], 8
jg 0x482910
cmp eax, 8
jg 0x482910
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 0x482869
and dword [esp + 0x20], 0
cmp dword [esp + 0x24], 0
je 0x48279b
cmp dword [esi], 0
jle 0x482844
mov eax, dword [esi + 0xac]
cmp eax, dword [esi + 0xb0]
jae 0x4826ad
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x4826c4
cmp dword [esi + 0x20], 0
je 0x4826c2
mov ecx, esi
call fcn.0047a80c
mov eax, dword [esi + 0xac]
jmp 0x4826a2
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 0x4826e8
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x482701
lea edi, [esi + 0x20]
cmp dword [edi], 0
je 0x4826ff
mov ecx, esi
call fcn.0047a80c
mov eax, dword [esi + 0xac]
jmp 0x4826dd
xor cl, cl
mov byte [ebx + ebp + 1], cl
mov eax, dword [esi + 0xac]
cmp eax, dword [esi + 0xb0]
jae 0x48271e
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x482734
cmp dword [edi], 0
je 0x482732
mov ecx, esi
call fcn.0047a80c
mov eax, dword [esi + 0xac]
jmp 0x482713
xor cl, cl
push 3
pop eax
mov byte [ebx + ebp], cl
add ebx, eax
cmp dword [esp + 0x24], 2
jne 0x482774
mov eax, dword [esi + 0xac]
cmp eax, dword [esi + 0xb0]
jae 0x48275c
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x482777
cmp dword [edi], 0
je 0x482770
mov ecx, esi
call fcn.0047a80c
mov eax, dword [esi + 0xac]
jmp 0x482751
xor cl, cl
jmp 0x482777
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 0x482694
jmp 0x482841
cmp dword [esi], 0
jle 0x482844
mov ecx, esi
cmp eax, 0x10
jne 0x4827b2
call fcn.0047a9e1
jmp 0x4827b7
call fcn.0047aa59
push dword [esp + 0x2c]
mov edx, dword [esp + 0x54]
mov edi, eax
mov ecx, edi
and ecx, dword [esp + 0x2c]
call fcn.00481b7f
push dword [esp + 0x34]
mov edx, dword [esp + 0x5c]
mov ecx, edi
and ecx, dword [esp + 0x40]
mov byte [ebx + ebp], al
call fcn.00481b7f
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.00481b7f
mov byte [ebx + ebp + 2], al
add esp, 0xc
mov eax, dword [esp + 0x14]
test eax, eax
je 0x48281c
push dword [esp + 0x48]
mov edx, dword [esp + 0x38]
and edi, eax
mov ecx, edi
call fcn.00481b7f
pop ecx
jmp 0x482821
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 0x4827a4
push 0x20
pop edi
mov edx, dword [esp + 0x60]
mov ecx, esi
call fcn.0047a867
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 0x48267b
cmp dword [esp + 0x40], 0
jne 0x48288c
mov eax, dword [esi]
imul eax, ecx
lea eax, [eax*4 - 1]
test eax, eax
js 0x48288c
mov byte [eax + ebp], 0xff
sub eax, 4
jns 0x482880
mov edx, dword [esi + 4]
cmp dword [esp + 0x4c], 0
jle 0x4828f5
xor edi, edi
test edx, 0xfffffffe
jle 0x4828f5
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 0x4828e9
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 0x4828d0
mov ebp, dword [esp + 0x58]
mov edx, dword [esi + 4]
inc edi
mov eax, edx
sar eax, 1
cmp edi, eax
jl 0x48289d
mov eax, dword [esi]
mov dword [0x5d4b6c], eax
mov eax, dword [esi + 4]
mov dword [0x5d4b64], eax
mov eax, dword [esi + 8]
mov dword [0x5d4b70], eax
mov eax, ebp
jmp 0x482954
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 0x482952
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov dword [eax + 0xc], str.bad_offset
jmp 0x482952
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