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

Disassembly:
sub esp, 8
push ebx
push ebp
mov ebp, dword [esp + 0x14]
push esi
push edi
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
xor ebx, ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x10], ebx
cmp ecx, 0x40
mov dword [esp + 0x14], ebx
jb 0x48a227
push ebp
push str.R_CreateImage:___s__is_too_long_n
push 1
call dword [0x1313c84]
add esp, 0xc
push 9
push 0x558d48
push ebp
call fcn.0051bea0
add esp, 0xc
test eax, eax
jne 0x48a243
mov dword [esp + 0x10], 1
push 0xa
push str.lightmapD
push ebp
call fcn.0051bea0
add esp, 0xc
test eax, eax
jne 0x48a25f
mov dword [esp + 0x14], 1
mov ecx, dword [0x132d254]
cmp ebx, ecx
jge 0x48a27f
mov eax, 0x132d258
cmp byte [eax], 0
je 0x48a27d
inc ebx
add eax, 0x84
cmp ebx, ecx
jl 0x48a26e
cmp ebx, ecx
jne 0x48a2a2
cmp ecx, 0x600
jne 0x48a29b
push str.R_CreateImage:_MAX_DRAWIMAGES_hit_n
push 1
call dword [0x1313c84]
add esp, 8
jmp 0x48a2a2
inc ecx
mov dword [0x132d254], ecx
mov eax, ebx
mov ecx, dword [esp + 0x2c]
shl eax, 5
mov edx, dword [esp + 0x14]
add eax, ebx
mov esi, dword [esp + 0x34]
lea edi, [eax*4 + 0x132d258]
mov eax, dword [esp + 0x38]
mov dword [edi + 0x64], ecx
mov cx, word [esp + 0x44]
mov dword [edi + 0x70], eax
mov dword [edi + 0x68], edx
mov dx, word [esp + 0x48]
mov word [edi + 0x74], cx
mov ecx, dword [esp + 0x1c]
mov eax, ebp
mov ebp, edi
mov dword [edi + 0x6c], esi
mov word [edi + 0x76], dx
mov dword [edi + 0x7c], 0
sub ebp, ecx
mov cl, byte [eax]
mov byte [eax + ebp], cl
inc eax
test cl, cl
jne 0x48a2ef
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov dword [edi + 0x40], eax
mov eax, dword [0x13e6c38]
add ebx, 0x400
mov dword [edi + 0x44], ecx
test eax, eax
mov dword [edi + 0x50], ebx
je 0x48a32a
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x48a32a
mov dword [edi + 0x60], 1
jmp 0x48a331
mov dword [edi + 0x60], 0
test eax, eax
je 0x48a341
mov edx, dword [edi + 0x60]
push edx
call fcn.00498800
add esp, 4
push edi
call fcn.00498780
mov eax, dword [esp + 0x44]
add esp, 4
test eax, eax
je 0x48a571
mov eax, dword [edi + 0x64]
mov ebp, dword [edi + 0x44]
mov ebx, dword [edi + 0x40]
xor ecx, ecx
test esi, esi
mov dword [esp + 0x3c], eax
je 0x48a381
mov ecx, dword [0x13e4278]
mov ecx, dword [ecx + 0x20]
test ecx, ecx
jle 0x48a381
mov eax, dword [esp + 0x30]
cmp ecx, eax
jl 0x48a381
lea ecx, [eax - 1]
test ecx, ecx
mov eax, ebx
mov edx, ebp
je 0x48a38d
sar eax, cl
sar edx, cl
mov esi, dword [0x13e6b20]
cmp eax, esi
jg 0x48a39b
cmp edx, esi
jle 0x48a3a2
sar eax, 1
sar edx, 1
inc ecx
jmp 0x48a393
test ecx, ecx
jle 0x48a3b9
mov esi, dword [esp + 0x30]
cmp ecx, esi
jl 0x48a3b9
lea ecx, [esi - 1]
mov eax, ebx
mov edx, ebp
sar eax, cl
sar edx, cl
mov dword [edi + 0x48], eax
mov eax, dword [esp + 0x40]
cmp eax, 0x83f1
mov dword [edi + 0x4c], edx
mov dword [edi + 0x5c], eax
je 0x48a3dc
cmp eax, 0x83f0
mov dword [esp + 0x2c], 0x10
jne 0x48a3e4
mov dword [esp + 0x2c], 8
mov edx, dword [esp + 0x20]
mov dword [esp + 0x20], 0
test ecx, ecx
mov dword [esp + 0x38], edx
jle 0x48a451
mov dword [esp + 0x34], ecx
mov dword [esp + 0x20], ecx
lea eax, [ebx + 3]
cdq
and edx, 3
add eax, edx
mov esi, eax
sar esi, 2
cmp esi, 1
jle 0x48a430
lea eax, [ebp + 3]
cdq
and edx, 3
add eax, edx
sar eax, 2
cmp eax, 1
jle 0x48a430
imul eax, esi
imul eax, dword [esp + 0x2c]
add dword [esp + 0x38], eax
sar ebx, 1
sar ebp, 1
test ebx, ebx
jne 0x48a43d
mov ebx, 1
test ebp, ebp
jne 0x48a446
mov ebp, 1
mov eax, dword [esp + 0x34]
dec eax
mov dword [esp + 0x34], eax
jne 0x48a400
mov eax, dword [esp + 0x20]
mov dword [edi + 0x58], 0
sub eax, ecx
test ebx, ebx
mov dword [esp + 0x34], eax
jne 0x48a473
test ebp, ebp
je 0x48a513
mov ebx, 1
test ebp, ebp
jne 0x48a47c
mov ebp, 1
lea eax, [ebp + 3]
cdq
and edx, 3
add eax, edx
mov ecx, eax
lea eax, [ebx + 3]
cdq
and edx, 3
sar ecx, 2
add eax, edx
mov esi, ecx
sar eax, 2
imul esi, eax
imul esi, dword [esp + 0x2c]
cmp eax, 1
mov dword [esp + 0x28], ecx
mov dword [esp + 0x24], eax
jle 0x48a4b5
cmp ecx, 1
jle 0x48a4b5
add dword [edi + 0x58], esi
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x34]
push eax
push esi
push 0
push ebp
push ebx
push ecx
push edx
push 0xde1
call dword [0x13e6b98]
call fcn.0048c960
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x30]
cmp eax, ecx
jge 0x48a4fc
mov ecx, dword [esp + 0x24]
mov eax, 1
cmp ecx, eax
jle 0x48a4fc
cmp dword [esp + 0x28], eax
jle 0x48a4fc
add dword [esp + 0x38], esi
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x34]
sar ebx, 1
sar ebp, 1
inc ecx
inc eax
mov dword [esp + 0x20], ecx
jmp 0x48a45e
cmp dword [esp + 0x3c], 1
jle 0x48a540
fild dword [0x5589dc]
push ecx
fstp dword [esp]
push 0x2801
push 0xde1
call dword [0x13e3f3c]
fild dword [0x5589e0]
push ecx
fstp dword [esp]
jmp 0x48a55a
push 0x46180400
push 0x2801
push 0xde1
call dword [0x13e3f3c]
push 0x46180400
push 0x2800
push 0xde1
call dword [0x13e3f3c]
call fcn.0048c960
jmp 0x48a5ae
mov ecx, dword [esp + 0x10]
lea edx, [edi + 0x58]
push ecx
lea eax, [edi + 0x4c]
push edx
lea ecx, [edi + 0x48]
push eax
mov eax, dword [esp + 0x48]
lea edx, [edi + 0x5c]
push ecx
mov ecx, dword [esp + 0x48]
push edx
mov edx, dword [edi + 0x68]
push eax
mov eax, dword [edi + 0x64]
push ecx
mov ecx, dword [edi + 0x44]
push edx
mov edx, dword [edi + 0x40]
push esi
push eax
mov eax, dword [esp + 0x48]
push ecx
push edx
push eax
call fcn.0048a670
add esp, 0x34
fild dword [esp + 0x44]
push ecx
fstp dword [esp]
push 0x2802
push 0xde1
call dword [0x13e3f3c]
fild dword [esp + 0x48]
push ecx
fstp dword [esp]
push 0x2803
push 0xde1
call dword [0x13e3f3c]
push 0
push 0xde1
call dword [0x13e3ee4]
mov eax, dword [edi + 0x60]
cmp eax, 1
mov dword [eax*4 + 0x13e6d20], 0xffffffff
jne 0x48a608
push 0
call fcn.00498800
add esp, 4
mov esi, dword [esp + 0x1c]
xor ebx, ebx
cmp byte [esi], 0
je 0x48a643
mov ebp, 0x77
sub ebp, esi
movsx ecx, byte [esi]
push ecx
call fcn.0051bc87
add esp, 4
cmp al, 0x2e
je 0x48a643
cmp al, 0x5c
jne 0x48a630
mov al, 0x2f
movsx eax, al
lea edx, [esi + ebp]
imul edx, eax
mov al, byte [esi + 1]
add ebx, edx
inc esi
test al, al
jne 0x48a61a
mov edx, dword [0x559048]
and ebx, 0x3ff
mov dword [edi + 0x78], edx
mov eax, edi
mov ecx, dword [ebx*4 + 0x7feea0]
mov dword [ebx*4 + 0x7feea0], edi
mov dword [edi + 0x80], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret