Function at 0x40a3a0
Capabilities:
Read file via mapping
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x344
push ebx
push esi
push edi
lea ecx, [esp + 0x28]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_C2bString::constructor_void_]
mov ebx, dword [ebp + 8]
mov ecx, dword [ebx + 0x28]
mov eax, dword [ebx + 0x24]
mov edx, dword [ebx + 0x2c]
push 0xc8
mov dword [esp + 0x5c], ecx
push 0
lea ecx, [esp + 0x1c]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x64], edx
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_CHanLib::constructor_class_CFontManager___int_]
lea ecx, [esp + 0x74]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_CHanEngFont::constructor_void_]
lea ecx, [esp + 0x14]
mov dword [esp + 0x48], 0x580000
mov dword [esp + 0x4c], 0x10000
call dword [sym.imp.Ngs3.dll_public:_class_CFontManager_const____thiscall_CHanLib::GetFontManager_void_const]
mov ecx, eax
call dword [sym.imp.Ngs3.dll_public:_bool___thiscall_CFontManager::IsLarge_void_const]
movzx ecx, al
push ecx
lea ecx, [esp + 0x78]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_CHanEngFont::Init_bool_]
lea edx, [esp + 0x74]
push edx
lea ecx, [esp + 0x18]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_CHanLib::SetHanEngFont_class_CHanEngFont__]
mov ecx, dword [ebx + 0x24]
lea eax, [esp + 0x38]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [ebx + 0xc]
add dword [esp + 0x40], 8
push eax
mov dword [esp + 0x70], eax
call dword [sym.imp.USER32.dll_GetDC]
push 2
mov dword [esp + 0x68], eax
call dword [sym.imp.USER32.dll_GetSystemMetrics]
mov edx, dword [ebx + 0x68]
mov ecx, dword [esp + 0x40]
add edx, edx
add edx, edx
add edx, edx
sub ecx, edx
sub ecx, dword [esp + 0x38]
sub ecx, eax
xor edi, edi
mov dword [esp + 0x70], ecx
mov dword [esp + 0x10], edi
jmp 0x40a484
mov edi, dword [esp + 0x10]
mov eax, dword [ebx + 0xb8]
cmp eax, 1
jne 0x40a822
mov eax, dword [esp + edi*4 + 0x54]
push 0
push 0
push 0x146
push eax
mov dword [esp + 0x70], eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [0x425630]
push 0x14
push 0
push ecx
mov dword [esp + 0x3c], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x40a529
mov edi, dword [ebx + 0x68]
imul edi, dword [esp + 0x30]
mov edx, dword [esp + 0x64]
mov ebx, dword [esp + 0x40]
sub ebx, dword [esp + 0x38]
push edx
add edi, edi
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push edi
mov dword [esi], eax
mov eax, dword [esp + 0x68]
push ebx
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov dword [esi + 4], eax
mov ecx, dword [esi]
mov dword [esi + 8], ecx
xor eax, eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
mov eax, dword [esi + 4]
mov edx, dword [esi + 8]
push eax
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
cmp dword [esi + 0xc], 0
jne 0x40a520
mov dword [esi + 0xc], eax
mov ebx, dword [ebp + 8]
mov edi, dword [esp + 0x10]
jmp 0x40a52b
xor esi, esi
mov dword [ebx + edi*4 + 0x58], esi
mov eax, dword [esi]
push eax
lea ecx, [esp + 0x18]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_CHanLib::SetDestDC_struct_HDC____]
push 0
push 0
push 0
lea ecx, [esp + 0x80]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_CHanEngFont::SetFonts_void_const___void_const___void_const__]
mov ecx, str.ABCabcxyz0123.
cmp edi, 1
je 0x40a55e
mov ecx, 0x420208
xor edx, edx
lea eax, [esp + 0xc8]
cmp word [ecx], dx
je 0x40a59d
mov esi, eax
sub ecx, esi
cmp edx, 0x40
jge 0x40a587
mov si, word [ecx + eax]
mov word [eax], si
add eax, 2
inc edx
cmp word [ecx + eax], 0
jne 0x40a570
test edx, edx
jle 0x40a598
cmp edx, 0x40
jne 0x40a59b
xor ecx, ecx
mov word [eax - 2], cx
jmp 0x40a5a2
cmp edx, 0x40
jge 0x40a5a2
xor edx, edx
mov word [eax], dx
xor edi, edi
mov dword [esp + 0x2c], edi
cmp dword [esp + 0x30], edi
jle 0x40a810
jmp 0x40a5c0
mov eax, dword [ebx + 0xb8]
cmp eax, 1
jne 0x40a810
mov edx, dword [esp + 0x60]
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
lea ecx, [esp + 0x148]
push ecx
push edi
push 0x148
push edx
call esi
lea eax, [esp + 0x148]
push eax
lea ecx, [esp + 0x2c]
push 5
push ecx
call dword [sym.imp.Ngs3.dll_ngsGetPath]
add esp, 0xc
cmp dword [esp + 0x10], 0
jne 0x40a621
mov edx, dword [esp + 0x54]
push 0
push edi
push 0x150
push edx
call esi
test al, 1
mov eax, str..hfn
jne 0x40a626
mov eax, str..fnt
push eax
lea ecx, [esp + 0x2c]
call dword [0x4253c8]
mov eax, dword [esp + 0x28]
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x24], esi
cmp esi, 0xffffffff
jne 0x40a666
xor eax, eax
mov dword [esp + 0x24], eax
mov esi, eax
jmp 0x40a911
test esi, esi
je 0x40a90f
push 0
push 0
push 0
push 2
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
push 0
push 0
push 0
mov ebx, eax
push 4
push ebx
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esp + 0x20], eax
test eax, eax
je 0x40a91b
mov edx, dword [esp + 0x10]
mov ecx, edx
sub ecx, 0
je 0x40a99f
dec ecx
je 0x40a987
dec ecx
jne 0x40a94d
push eax
lea ecx, [esp + 0x78]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_CHanEngFont::SetHanWanFont_void_const__]
mov dword [esp + 0x34], 6
mov ebx, dword [sym.imp.USER32.dll_GetSysColor]
push 5
call ebx
push eax
push 8
call ebx
push eax
lea ecx, [esp + 0x1c]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_CHanLib::SetColors_unsigned_long_int__unsigned_long_int_]
mov edx, dword [ebp + 8]
mov esi, dword [edx + 0x68]
mov eax, dword [esp + 0x40]
imul esi, edi
sub eax, dword [esp + 0x38]
push 0
push 0
push eax
push 0
push 0xffffffffffffffff
lea ecx, [esp + 0x15c]
push ecx
add esi, esi
push esi
push 0
lea ecx, [esp + 0x34]
call dword [sym.imp.Ngs3.dll_public:_int___thiscall_CHanLib::UPuts_int__int__wchar_t_const___int__int__int__struct_CHanLib::COLOR_INFO_const___int_]
push 0x11
lea edi, [eax + 0x10]
call ebx
push eax
lea ecx, [esp + 0x18]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_CHanLib::SetCharColor_unsigned_long_int_]
mov eax, dword [esp + 0x70]
cmp edi, eax
jg 0x40a737
mov edi, eax
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x34]
push 0
push 0
sub edx, edi
sub edx, dword [esp + 0x40]
lea ecx, [esp + 0xd0]
push edx
push 0
push eax
push ecx
push esi
push edi
lea ecx, [esp + 0x34]
call dword [sym.imp.Ngs3.dll_public:_int___thiscall_CHanLib::UPuts_int__int__wchar_t_const___int__int__int__struct_CHanLib::COLOR_INFO_const___int_]
mov edx, dword [ebp + 8]
add esi, dword [edx + 0x68]
push 0xd
call ebx
push eax
push 0xe
call ebx
push eax
lea ecx, [esp + 0x1c]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_CHanLib::SetColors_unsigned_long_int__unsigned_long_int_]
mov eax, dword [esp + 0x40]
sub eax, dword [esp + 0x38]
mov ebx, dword [sym.imp.Ngs3.dll_public:_int___thiscall_CHanLib::UPuts_int__int__wchar_t_const___int__int__int__struct_CHanLib::COLOR_INFO_const___int_]
push 0
push 0
push eax
push 0
push 0xffffffffffffffff
lea ecx, [esp + 0x15c]
push ecx
push esi
push 0
lea ecx, [esp + 0x34]
call ebx
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x34]
push 0
push 0
sub edx, edi
sub edx, dword [esp + 0x40]
lea ecx, [esp + 0xd0]
push edx
push 0
push eax
push ecx
push esi
push edi
lea ecx, [esp + 0x34]
call ebx
mov edi, dword [esp + 0x24]
test edi, edi
je 0x40a7fa
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [esp + 0x1c]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
push eax
mov dword [esp + 0x24], esi
call ebx
push edi
call ebx
mov dword [esp + 0x24], esi
mov dword [esp + 0x1c], esi
mov edi, dword [esp + 0x2c]
mov ebx, dword [ebp + 8]
inc edi
mov dword [esp + 0x2c], edi
cmp edi, dword [esp + 0x30]
jl 0x40a5c0
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
cmp eax, 3
jl 0x40a480
mov ecx, dword [ebx + 0xb8]
xor eax, eax
cmp ecx, 1
sete al
mov dword [ebx + 0xb8], 2
test eax, eax
je 0x40a8d8
cmp dword [ebx + 0xb4], 0
je 0x40a8d8
mov edi, dword [sym.imp.USER32.dll_InvalidateRect]
xor ebx, ebx
jmp 0x40a860
push 0x30
lea edx, [esp + 0x9c]
push 0
push edx
call sub.MSVCRT.dll_memset
mov esi, dword [esp + ebx*4 + 0x60]
add esp, 0xc
push 0
push 0
push esi
mov dword [esp + 0xa0], 0x34
call edi
lea eax, [esp + 0x94]
push eax
push 0
push 0x164
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [esp + 0xc4]
push 0
push 0
push ecx
call edi
inc ebx
cmp ebx, 3
jl 0x40a860
lea edx, [esp + 0x8c]
push edx
call dword [sym.imp.USER32.dll_GetCursorPos]
mov eax, dword [esp + 0x90]
mov ecx, dword [esp + 0x8c]
push eax
push ecx
call dword [sym.imp.USER32.dll_SetCursorPos]
mov edx, dword [esp + 0x64]
mov eax, dword [esp + 0x6c]
push edx
push eax
call dword [sym.imp.USER32.dll_ReleaseDC]
lea ecx, [esp + 0x74]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_CHanEngFont::destructor_void_]
lea ecx, [esp + 0x14]
call dword [sym.imp.Ngs3.dll_public_virtual:_void___thiscall_CHanLib::destructor_void_]
lea ecx, [esp + 0x28]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_C2bString::destructor_void_]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov ebx, eax
test edi, edi
jne 0x40a9ac
xor edx, edx
cmp dword [esp + 0x10], 2
push 0x104
setne dl
lea ecx, [esp + 0x14c]
push ecx
add edx, 0x93
push edx
call fcn.0041d910
mov edx, dword [esp + 0x1c]
add esp, 0xc
cmp edx, 2
je 0x40a6c8
test edx, edx
jne 0x40a97a
test edi, edi
jle 0x40a97a
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x48]
push eax
push ecx
lea ecx, [esp + 0x7c]
call dword [sym.imp.Ngs3.dll_public:_bool___thiscall_CHanEngFont::IsHanGlyphAvailable_struct_NGSCHAR_const]
test al, al
je 0x40a6c8
mov dword [esp + 0x34], 0xffffffff
jmp 0x40a6d0
push eax
lea ecx, [esp + 0x78]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_CHanEngFont::SetEngFont_void_const__]
mov dword [esp + 0x34], 0xffffffff
jmp 0x40a6d0
push eax
lea ecx, [esp + 0x78]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_CHanEngFont::SetHanFont_void_const__]
jmp 0x40a95a
test esi, esi
je 0x40a7fe
push 0
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x24], 0
call ebx
push esi
call ebx
xor eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], eax
jmp 0x40a7fe