Function at 0x4e1cd0
Capabilities:
Enumerate pe sections
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x84
push ebx
push esi
push edi
mov edi, ecx
call dword [sym.imp.OPENGL32.dll_wglGetCurrentContext]
test eax, eax
je 0x4e2100
mov eax, dword [edi + 0x18]
xor ecx, ecx
cmp eax, ecx
je 0x4e1d06
mov edx, dword [edi + 0x1c]
sub edx, eax
sar edx, 2
jne 0x4e1e19
cmp dword [edi + 0x28], ecx
mov dword [esp + 0x10], ecx
jbe 0x4e1e19
mov eax, dword [edi + 0x24]
cmp eax, ecx
mov dword [esp + 0x14], ecx
jbe 0x4e1e05
jmp 0x4e1d26
xor ecx, ecx
imul eax, dword [esp + 0x10]
mov esi, dword [edi + 0x10]
add eax, dword [esp + 0x14]
mov ebx, dword [esi + 0x1c]
add esi, 0x18
cmp ebx, ecx
mov dword [esp + 0x18], eax
je 0x4e2109
mov edx, dword [esi + 8]
mov ecx, edx
sub ecx, ebx
sar ecx, 2
cmp ecx, eax
jbe 0x4e2109
cmp ebx, edx
jbe 0x4e1d63
call fcn.0052a951
mov eax, dword [esp + 0x18]
mov dword [esp + 0x5c], ebx
lea ebx, [ebx + eax*4]
cmp ebx, dword [esi + 8]
ja 0x4e1d74
cmp ebx, dword [esi + 4]
jae 0x4e1d79
call fcn.0052a951
cmp ebx, dword [esi + 8]
jb 0x4e1d83
call fcn.0052a951
mov eax, dword [ebx]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
push eax
push ecx
push edx
mov ecx, edi
call sym.RtHDVCpl.exe_protected:_unsigned_long_int___thiscall_TexturedImage::SaveTexture_unsigned_long_int__unsigned_long_int__unsigned_char__
mov ecx, dword [edi + 0x18]
test ecx, ecx
lea esi, [edi + 0x14]
mov dword [esp + 0x18], eax
jne 0x4e1da9
xor ebx, ebx
jmp 0x4e1db1
mov ebx, dword [esi + 8]
sub ebx, ecx
sar ebx, 2
test ecx, ecx
je 0x4e1dce
mov edx, dword [esi + 0xc]
sub edx, ecx
sar edx, 2
cmp ebx, edx
jae 0x4e1dce
mov ecx, dword [esi + 8]
mov dword [ecx], eax
add ecx, 4
mov dword [esi + 8], ecx
jmp 0x4e1ded
mov ebx, dword [esi + 8]
cmp ecx, ebx
jbe 0x4e1dda
call fcn.0052a951
push ebx
push esi
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x5c]
push ecx
mov eax, esi
call fcn.004ded00
mov ecx, dword [esp + 0x14]
mov eax, dword [edi + 0x24]
add ecx, 1
cmp ecx, eax
mov dword [esp + 0x14], ecx
jb 0x4e1d24
xor ecx, ecx
mov eax, dword [esp + 0x10]
add eax, 1
cmp eax, dword [edi + 0x28]
mov dword [esp + 0x10], eax
jb 0x4e1d13
mov eax, dword [ebp + 8]
fldz
movzx edx, word [eax + 2]
fst qword [esp + 0x70]
mov si, word [eax + 6]
fst qword [esp + 0x78]
sub si, dx
fst qword [esp + 0x80]
movsx esi, si
fstp qword [esp + 0x88]
mov dword [esp + 0x18], esi
mov esi, dword [edi + 4]
test esi, esi
fild dword [esp + 0x18]
fild dword [edi + 4]
mov word [esp + 0x28], cx
mov word [esp + 0x2a], cx
mov word [esp + 0x2c], cx
mov word [esp + 0x2e], cx
mov word [esp + 0x64], cx
mov word [esp + 0x66], cx
mov word [esp + 0x68], cx
mov word [esp + 0x6a], cx
mov word [esp + 0x30], cx
mov word [esp + 0x32], cx
mov word [esp + 0x34], cx
mov word [esp + 0x36], cx
jge 0x4e1e96
fadd qword [0x587420]
movzx esi, word [eax]
fdivp st(1)
mov ax, word [eax + 4]
sub ax, si
movsx eax, ax
mov dword [esp + 0x18], eax
mov eax, dword [edi + 8]
test eax, eax
fstp qword [esp + 0x40]
fild dword [esp + 0x18]
fild dword [edi + 8]
jge 0x4e1ec1
fadd qword [0x587420]
fdivp st(1)
movsx edx, dx
mov dword [esp + 0x18], edx
movsx eax, si
fstp qword [esp + 0x50]
fild dword [esp + 0x18]
mov dword [esp + 0x18], eax
xor eax, eax
cmp dword [edi + 0x28], ecx
fstp qword [esp + 0x48]
mov dword [esp + 0x10], eax
fild dword [esp + 0x18]
fstp qword [esp + 0x58]
jbe 0x4e2100
xor ebx, ebx
cmp dword [edi + 0x24], ecx
mov dword [esp + 0x14], ebx
jbe 0x4e20f0
mov ecx, eax
shl ecx, 9
movzx edx, cx
mov dword [esp + 0x1c], edx
nop
mov ecx, dword [edi + 0x28]
sub ecx, 1
cmp eax, ecx
mov esi, 0x200
mov dword [esp + 0x18], esi
jne 0x4e1f3f
mov edx, dword [edi + 8]
push esi
push edx
call fcn.0052ceac
add esp, 8
test edx, edx
mov dword [esp + 0x20], eax
je 0x4e1f3f
movzx eax, dx
mov dword [esp + 0x18], eax
mov ecx, dword [edi + 0x24]
sub ecx, 1
cmp ebx, ecx
jne 0x4e1f65
mov edx, dword [edi + 4]
push 0x200
push edx
call fcn.0052ceac
add esp, 8
test edx, edx
mov dword [esp + 0x20], eax
je 0x4e1f65
movzx esi, dx
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov eax, ebx
shl eax, 9
movzx eax, ax
mov word [esp + 0x2a], ax
mov word [esp + 0x28], cx
add eax, esi
add ecx, edx
mov word [esp + 0x2e], ax
mov word [esp + 0x2c], cx
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x2c]
push ecx
mov ecx, dword [ebp + 0xc]
call sym.RtHDVCpl.exe_public:_bool___thiscall_WURect_short_int_::GetIntersection_class_WURect_short_int__const___class_WURect_short_int___const
test al, al
je 0x4e20da
mov esi, dword [edi + 0x24]
imul esi, dword [esp + 0x10]
add esi, ebx
mov ebx, dword [edi + 0x18]
test ebx, ebx
je 0x4e210e
mov ecx, dword [edi + 0x1c]
mov eax, ecx
sub eax, ebx
sar eax, 2
cmp eax, esi
jbe 0x4e210e
cmp ebx, ecx
jbe 0x4e1fd7
call fcn.0052a951
lea eax, [edi + 0x14]
lea esi, [ebx + esi*4]
cmp esi, dword [eax + 8]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ebx
ja 0x4e1fef
cmp esi, dword [eax + 4]
jae 0x4e1ff4
call fcn.0052a951
mov edx, dword [esp + 0x38]
cmp esi, dword [edx + 8]
jb 0x4e2002
call fcn.0052a951
mov eax, dword [esi]
movsx edx, word [esp + 0x66]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xc]
movsx ecx, word [eax + 2]
movsx eax, word [eax]
sub edx, ecx
movsx ecx, word [esp + 0x64]
mov dword [esp + 0x20], edx
mov esi, dword [esp + 0x64]
fild dword [esp + 0x20]
sub ecx, eax
fld qword [esp + 0x40]
mov eax, dword [esp + 0x6a]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x66]
fmul st(1), st(0)
fxch st(1)
sub eax, ecx
sub ecx, dword [esp + 0x2a]
fadd qword [esp + 0x48]
movsx edx, ax
fst qword [esp + 0x78]
movzx ecx, cx
fild dword [esp + 0x20]
fld qword [esp + 0x50]
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x68]
fmul st(1), st(0)
fxch st(1)
sub edx, esi
sub esi, dword [esp + 0x28]
fadd qword [esp + 0x58]
movsx ebx, dx
fst qword [esp + 0x70]
add eax, ecx
fild dword [esp + 0x20]
movzx esi, si
fmulp st(4)
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x14]
fxch st(3)
mov word [esp + 0x36], ax
faddp st(2)
mov word [esp + 0x32], cx
fxch st(1)
add edx, esi
lea eax, [esp + 0x30]
fstp qword [esp + 0x88]
push eax
fild dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x74]
push ecx
fmulp st(1)
mov word [esp + 0x3c], dx
mov edx, dword [esp + 0x18]
push edx
faddp st(1)
push ebx
push eax
mov ecx, edi
fstp qword [esp + 0x94]
mov word [esp + 0x44], si
call sym.RtHDVCpl.exe_protected:_void___thiscall_TexturedImage::DrawTexture_unsigned_int__unsigned_long_int__unsigned_long_int__class_WURect_double__const___class_WURect_short_int__const__
mov eax, dword [esp + 0x10]
add ebx, 1
cmp ebx, dword [edi + 0x24]
mov dword [esp + 0x14], ebx
jb 0x4e1f10
xor ecx, ecx
add eax, 1
cmp eax, dword [edi + 0x28]
mov dword [esp + 0x10], eax
jb 0x4e1ef4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
call fcn.004e2330
call fcn.004e2330
int3