Function at 0x54f6d0
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xa4
mov eax, dword [0x773b90]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
cmp esi, edi
mov ebx, ecx
mov dword [ebp - 0xa0], eax
jne 0x54f706
mov eax, 0x8876086c
jmp 0x54ff2d
cmp eax, edi
je 0x54f6fc
mov dword [ebx + 8], esi
mov eax, dword [esi]
push esi
call dword [eax + 4]
mov eax, dword [esi]
lea ecx, [ebp - 0xa4]
push ecx
push 0x401a60
push esi
mov dword [ebp - 0xa4], edi
call dword [eax]
test eax, eax
jge 0x54f733
mov dword [ebx + 0x10], edi
jmp 0x54f74c
mov eax, dword [ebp - 0xa4]
mov dword [ebx + 0x10], 1
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0xa4], edi
cmp dword [0x776280], edi
jne 0x54f97a
mov dword [0x776280], 1
call fcn.0054c7a0
cmp dword [0x776264], edi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
je 0x54f7e8
mov edi, 0x401930
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
mov dword [ebp - 0x9c], eax
jne 0x54f79c
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [ebp - 0x9c], eax
je 0x54f7e8
push 0x40191c
push dword [ebp - 0x9c]
call esi
test eax, eax
mov dword [0x776284], eax
je 0x54f7de
push 0x40190c
push dword [ebp - 0x9c]
call esi
test eax, eax
mov dword [0x776288], eax
je 0x54f7de
push 0x4018f4
push dword [ebp - 0x9c]
call esi
test eax, eax
mov dword [0x77628c], eax
jne 0x54f7e8
mov eax, 0x8007000e
jmp 0x54ff2d
push 0x4018e8
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
test edi, edi
jne 0x54f80e
push 0x4018e8
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x54f97a
push 0x4018d8
push edi
mov dword [0x776290], 1
call esi
test eax, eax
mov dword [0x776294], eax
je 0x54f7de
push 0x4018cc
push edi
call esi
test eax, eax
mov dword [0x776298], eax
je 0x54f7de
push 0x4018c0
push edi
call esi
test eax, eax
mov dword [0x77629c], eax
je 0x54f7de
push 0x4018b4
push edi
call esi
test eax, eax
mov dword [0x7762a0], eax
je 0x54f7de
push 0x4018a4
push edi
call esi
test eax, eax
mov dword [0x7762a4], eax
je 0x54f7de
push 0x401894
push edi
call esi
test eax, eax
mov dword [0x7762a8], eax
je 0x54f7de
push 0x401880
push edi
call esi
test eax, eax
mov dword [0x7762ac], eax
je 0x54f7de
push 0x401870
push edi
call esi
test eax, eax
mov dword [0x7762b0], eax
je 0x54f7de
push 0x401850
push edi
call esi
test eax, eax
mov dword [0x7762b4], eax
je 0x54f7de
push 0x401830
push edi
call esi
test eax, eax
mov dword [0x7762b8], eax
je 0x54f7de
push 0x401818
push edi
call esi
test eax, eax
mov dword [0x7762bc], eax
je 0x54f7de
push 0x401804
push edi
call esi
test eax, eax
mov dword [0x7762c0], eax
je 0x54f7de
push 0x4017f4
push edi
call esi
test eax, eax
mov dword [0x7762c4], eax
je 0x54f7de
push 0x4017e0
push edi
call esi
test eax, eax
mov dword [0x7762c8], eax
je 0x54f7de
push 0x4017cc
push edi
call esi
test eax, eax
mov dword [0x7762cc], eax
je 0x54f7de
push 0x4017b8
push edi
call esi
test eax, eax
mov dword [0x7762d0], eax
je 0x54f7de
lea eax, [ebp - 0x9c]
push eax
push 0x7762e0
call dword [0x7762ac]
push 0x7762d4
push 0x400
call dword [0x7762b4]
xor esi, esi
push esi
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
cmp eax, esi
mov dword [ebx + 0x14], eax
je 0x54f7de
push 1
push eax
call dword [sym.imp.GDI32.dll_SetMapMode]
cmp dword [0x776264], esi
jne 0x54f9aa
push 1
push dword [ebx + 0x14]
call dword [sym.imp.GDI32.dll_SetTextAlign]
cmp dword [ebp + 0x10], esi
je 0x54fa73
cmp dword [0x776264], esi
jne 0x54f9fc
mov eax, dword [ebp - 0xa0]
push 6
pop ecx
mov esi, eax
lea edi, [ebp - 0x98]
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
push ecx
push ecx
push 0x20
lea edx, [ebp - 0x80]
push edx
push 0xffffffffffffffff
add eax, 0x18
push eax
push ecx
push ecx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
and dword [ebp + 0x10], 0
lea eax, [ebp - 0x98]
mov byte [ebp - 0x61], 0
mov dword [ebp - 0xa0], eax
xor esi, esi
cmp dword [ebp + 0x10], esi
je 0x54fa73
push 0x5c
lea eax, [ebp - 0x60]
push 0
push eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0xa0]
mov ecx, dword [eax]
mov dword [ebp - 0x60], ecx
mov ecx, dword [eax + 4]
mov dword [ebp - 0x5c], ecx
mov ecx, dword [eax + 8]
mov dword [ebp - 0x50], ecx
mov cl, byte [eax + 0x10]
mov byte [ebp - 0x4c], cl
mov cl, byte [eax + 0x14]
mov byte [ebp - 0x49], cl
mov cl, byte [eax + 0x15]
mov byte [ebp - 0x48], cl
mov cl, byte [eax + 0x16]
mov byte [ebp - 0x46], cl
mov cl, byte [eax + 0x17]
add esp, 0xc
mov byte [ebp - 0x45], cl
push 0x10
lea esi, [eax + 0x18]
pop ecx
lea edi, [ebp - 0x44]
rep movsd dword es:[edi], dword [esi]
test byte [ebp - 0x46], 7
jne 0x54fa5b
or byte [ebp - 0x46], 4
lea eax, [ebp - 0x60]
push eax
call dword [sym.imp.GDI32.dll_CreateFontIndirectW]
xor esi, esi
cmp eax, esi
mov dword [ebx + 0x18], eax
jne 0x54fae4
jmp 0x54f7de
push 0x3c
lea eax, [ebp - 0x40]
push 0
push eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0xa0]
mov ecx, dword [eax]
mov dword [ebp - 0x40], ecx
mov ecx, dword [eax + 4]
mov dword [ebp - 0x3c], ecx
mov ecx, dword [eax + 8]
mov dword [ebp - 0x30], ecx
mov cl, byte [eax + 0x10]
mov byte [ebp - 0x2c], cl
mov cl, byte [eax + 0x14]
mov byte [ebp - 0x29], cl
mov cl, byte [eax + 0x15]
mov byte [ebp - 0x28], cl
mov cl, byte [eax + 0x16]
mov byte [ebp - 0x26], cl
mov cl, byte [eax + 0x17]
add esp, 0xc
mov byte [ebp - 0x25], cl
push 8
lea esi, [eax + 0x18]
pop ecx
lea edi, [ebp - 0x24]
rep movsd dword es:[edi], dword [esi]
test byte [ebp - 0x26], 7
jne 0x54facd
or byte [ebp - 0x26], 4
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.GDI32.dll_CreateFontIndirectA]
test eax, eax
mov dword [ebx + 0x18], eax
je 0x54f7de
xor esi, esi
push dword [ebx + 0x18]
mov eax, dword [ebp - 0xa0]
mov eax, dword [eax + 0xc]
push dword [ebx + 0x14]
mov dword [ebx + 0x514], eax
call dword [sym.imp.GDI32.dll_SelectObject]
push dword [ebx + 0x14]
mov dword [ebx + 0x1c], eax
call dword [sym.imp.GDI32.dll_GetFontLanguageInfo]
mov dword [ebx + 0x70], eax
cmp dword [0x776264], esi
je 0x54fb25
lea eax, [ebx + 0x34]
push eax
push dword [ebx + 0x14]
call dword [sym.imp.GDI32.dll_GetTextMetricsW]
jmp 0x54fb6b
lea eax, [ebp - 0x3c]
push eax
push dword [ebx + 0x14]
call dword [sym.imp.GDI32.dll_GetTextMetricsA]
movzx ax, byte [ebp - 0x10]
mov word [ebx + 0x60], ax
movzx ax, byte [ebp - 0xf]
push 0xb
lea edi, [ebx + 0x34]
pop ecx
lea esi, [ebp - 0x3c]
rep movsd dword es:[edi], dword [esi]
mov word [ebx + 0x62], ax
movzx ax, byte [ebp - 0xe]
lea edi, [ebx + 0x68]
lea esi, [ebp - 0xc]
movsd dword es:[edi], dword [esi]
mov word [ebx + 0x64], ax
movzx ax, byte [ebp - 0xd]
movsb byte es:[edi], byte [esi]
mov word [ebx + 0x66], ax
xor esi, esi
mov ecx, dword [ebx + 0x4c]
lea eax, [ebx + 0x28]
mov dword [eax], ecx
mov ecx, dword [ebx + 0x34]
mov dword [ebx + 0x2c], ecx
lea ecx, [ebx + 0x30]
push ecx
push eax
mov ecx, ebx
call fcn.0054f14d
cmp eax, esi
mov dword [ebx + 0x20], eax
je 0x54f7de
push 2
push dword [ebx + 0x14]
call dword [sym.imp.GDI32.dll_SetBkMode]
push esi
push dword [ebx + 0x14]
call dword [sym.imp.GDI32.dll_SetBkColor]
push 0xffffff
push dword [ebx + 0x14]
call dword [sym.imp.GDI32.dll_SetTextColor]
push dword [ebx + 0x20]
push dword [ebx + 0x14]
call dword [sym.imp.GDI32.dll_SelectObject]
push 0x400
mov dword [ebx + 0x24], eax
lea eax, [ebx + 0x94]
push esi
push eax
mov dword [ebx + 0x90], esi
call sub.msvcrt.dll_memset
xor ecx, ecx
inc ecx
add esp, 0xc
cmp dword [ebx + 0x34], ecx
lea eax, [ebx + 0x4c4]
mov dword [ebx + 0x498], 0x15
mov dword [ebx + 0x49c], esi
mov dword [ebx + 0x4b0], esi
mov dword [ebx + 0x4b4], esi
mov dword [ebx + 0x4d0], esi
mov dword [ebx + 0x4d4], esi
mov dword [ebx + 0x4bc], ecx
mov dword [eax], ecx
jbe 0x54fc2e
shl dword [ebx + 0x4bc], 1
inc dword [eax]
mov ecx, dword [ebx + 0x4bc]
cmp ecx, dword [ebx + 0x34]
jb 0x54fc1b
mov ecx, dword [ebx + 0x4bc]
mov edx, dword [eax]
mov dword [ebx + 0x4dc], ecx
mov dword [ebx + 0x4e4], edx
jmp 0x54fc52
shl dword [ebx + 0x4bc], 1
inc dword [eax]
mov ecx, dword [ebx + 0x4bc]
cmp ecx, dword [ebx + 0x48]
jb 0x54fc44
jmp 0x54fc65
shl dword [ebx + 0x4dc], 1
inc dword [ebx + 0x4e4]
mov eax, dword [ebx + 0x4dc]
cmp eax, dword [ebx + 0x4c]
jb 0x54fc59
mov ecx, dword [ebx + 0x4dc]
mov edx, dword [ebx + 0x4bc]
mov edi, ecx
mov eax, edx
imul edi, ecx
mov ecx, dword [ebx + 0x514]
imul eax, edx
cmp ecx, esi
mov dword [ebx + 0x4c0], eax
mov dword [ebx + 0x4e0], edi
je 0x54fcb4
lea edi, [ebx + 0x4c4]
cmp dword [edi], ecx
jbe 0x54fca8
mov dword [edi], ecx
lea edi, [ebx + 0x4e4]
cmp dword [edi], ecx
jbe 0x54fcb4
mov dword [edi], ecx
movzx edi, word [ebx + 0x60]
movzx ecx, word [ebx + 0x62]
sub ecx, edi
inc ecx
mov edi, 0x80
cmp ecx, edi
mov dword [ebp - 0x9c], ecx
jbe 0x54fcd4
mov dword [ebp - 0x9c], edi
mov ecx, dword [ebx + 0x4dc]
mov dword [ebx + 0x4e8], ecx
mov ecx, dword [ebp - 0x9c]
imul ecx, eax
cmp ecx, eax
lea edi, [ebx + 0x4c8]
mov dword [edi], edx
jbe 0x54fd18
mov eax, dword [edi]
cmp eax, 0x100
jae 0x54fd18
add eax, eax
mov dword [edi], eax
mov ecx, dword [ebx + 0x4c0]
imul ecx, dword [ebp - 0x9c]
mov edx, eax
imul edx, eax
cmp ecx, edx
ja 0x54fcf5
mov ecx, dword [edi]
cmp dword [ebx + 0x4dc], ecx
jae 0x54fd28
mov dword [ebx + 0x4e8], ecx
mov eax, dword [ebx + 0x4e8]
imul ecx, ecx
imul eax, eax
cmp dword [ebx + 0x10], esi
mov dword [ebx + 0x4ec], eax
mov dword [ebx + 0x4d8], eax
mov dword [ebx + 0x4cc], ecx
mov dword [ebx + 0x4b8], ecx
lea eax, [ebx + 0x498]
je 0x54fe5e
push esi
push eax
push esi
lea eax, [ebx + 0x4c4]
push eax
push edi
push edi
push dword [ebx + 8]
call sym.d3dx9_35.dll_D3DXCheckTextureRequirements
cmp eax, esi
jl 0x54ff2d
push esi
lea eax, [ebx + 0x498]
push eax
push esi
lea eax, [ebx + 0x4e4]
push eax
lea eax, [ebx + 0x4e8]
push eax
push eax
push dword [ebx + 8]
call sym.d3dx9_35.dll_D3DXCheckTextureRequirements
cmp eax, esi
jl 0x54ff2d
push 2
lea eax, [ebx + 0x498]
push eax
push esi
lea eax, [ebx + 0x4c4]
push eax
push edi
push edi
push dword [ebx + 8]
call sym.d3dx9_35.dll_D3DXCheckTextureRequirements
cmp eax, esi
jl 0x54ff2d
push 2
lea eax, [ebx + 0x498]
push eax
push esi
lea eax, [ebx + 0x4e4]
push eax
lea eax, [ebx + 0x4e8]
push eax
push eax
push dword [ebx + 8]
call sym.d3dx9_35.dll_D3DXCheckTextureRequirements
cmp eax, esi
jl 0x54ff2d
cmp dword [ebx + 0x498], 0x15
jne 0x54ff28
mov eax, dword [edi]
cmp eax, dword [ebx + 0x4bc]
jb 0x54ff28
mov eax, dword [ebx + 0x4e8]
cmp eax, dword [ebx + 0x4dc]
jb 0x54ff28
cmp dword [ebx + 0x4e4], 1
push 8
lea edi, [ebx + 0x4f0]
pop ecx
lea esi, [ebx + 0x4b0]
rep movsd dword es:[edi], dword [esi]
jbe 0x54fe82
mov eax, dword [ebx + 0x4e0]
xor ecx, ecx
push 8
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
xor esi, esi
cmp eax, esi
pop ecx
mov dword [ebx + 0x510], eax
jne 0x54fe84
jmp 0x54f7de
push 1
push eax
push esi
lea eax, [ebx + 0x4c4]
push eax
push edi
push edi
push dword [ebx + 8]
call sym.d3dx9_35.dll_D3DXCheckTextureRequirements
cmp eax, esi
jl 0x54ff2d
push 1
jmp 0x54fdc4
xor esi, esi
xor eax, eax
cmp dword [0x776290], esi
je 0x54feb1
lea ecx, [ebx + 0x78]
mov edi, ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push ecx
lea eax, [ebx + 0x74]
push eax
push dword [ebx + 0x14]
mov dword [ecx], 0x10
call dword [0x7762bc]
cmp eax, esi
jge 0x54ff24
jmp 0x54ff2d
push 9
pop ecx
lea edi, [ebp - 0x28]
rep stosd dword es:[edi], eax
lea eax, [ebx + 0x7e]
push esi
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x28]
push eax
xor edi, edi
inc edi
cmp dword [0x776264], esi
push esi
push edi
lea eax, [ebx + 0x64]
push eax
push dword [ebx + 0x14]
mov dword [ebp - 0x28], 0x24
mov dword [ebp - 0xc], edi
je 0x54feea
call dword [sym.imp.GDI32.dll_GetCharacterPlacementW]
jmp 0x54fef0
call dword [sym.imp.GDI32.dll_GetCharacterPlacementA]
cmp dword [0x776264], esi
lea eax, [ebx + 0x7c]
push esi
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x28]
push eax
push esi
push edi
lea eax, [ebx + 0x66]
push eax
push dword [ebx + 0x14]
mov dword [ebp - 0x28], 0x24
mov dword [ebp - 0xc], edi
je 0x54ff1e
call dword [sym.imp.GDI32.dll_GetCharacterPlacementW]
jmp 0x54ff24
call dword [sym.imp.GDI32.dll_GetCharacterPlacementA]
xor eax, eax
jmp 0x54ff2d
mov eax, 0x88760b59
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0074f205
leave
ret 0xc