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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x298
push ebx
push esi
mov ebx, ecx
push edi
lea ecx, [ebx + 0x3c]
mov edi, eax
call dword [sym.imp.Ngs3.dll_public:_int___thiscall_CHanLib::GetCharHalfWidth_void_const]
xor ecx, ecx
cmp eax, 0xc
mov dword [ebp - 8], eax
mov eax, dword [ebx + 0x28]
sete cl
imul eax, eax, 0x19
lea ecx, [ecx + ecx + 4]
cdq
idiv ecx
lea ecx, [ebx + 0x3c]
mov edx, eax
neg edx
push edx
push eax
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_CHanLib::SetMagFactor_int__int_]
mov eax, dword [ebx + 0x1c]
mov ecx, dword [eax + 0x18]
push ecx
lea ecx, [ebx + 0x3c]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_CHanLib::SetTabLength_int_]
mov ecx, dword [ebp + 8]
mov esi, dword [ebx + 0x20]
mov dword [ebx + 0x30], ecx
mov dword [ebx + 0x34], edi
mov eax, dword [esi + 0x200]
lea edx, [eax + eax*4]
add edx, edx
mov dword [ebx + 0x44], edx
mov eax, dword [esi + 0x204]
mov edx, eax
neg edx
add edx, edx
add edx, edx
sub edx, eax
add edx, edx
cmp byte [ebx + 0x38], 0
mov dword [ebx + 0x48], edx
je 0x41a00d
mov eax, dword [esi + 0x20c]
add eax, dword [esi + 0x204]
lea eax, [eax + eax*4]
add eax, eax
sub edi, eax
mov dword [ebp + 8], edi
jmp 0x41a025
mov eax, dword [esi + 0x208]
add eax, dword [esi + 0x200]
lea edx, [eax + eax*4]
add edx, edx
sub ecx, edx
mov edi, ecx
mov dword [ebp + 8], ecx
mov ecx, dword [esi + 0x218]
mov eax, dword [ebx + 0x28]
lea eax, [eax + eax*2]
lea ecx, [ecx + ecx*4]
add ecx, ecx
lea eax, [ecx + eax*4]
mov dword [ebp - 0xc], eax
lea eax, [ecx + edi]
cdq
idiv dword [ebp - 0xc]
mov esi, dword [esi + 0x214]
cmp esi, eax
jl 0x41a04f
mov esi, eax
mov dword [ebx + 0x60], esi
cmp esi, 1
jg 0x41a05c
mov esi, 1
mov eax, dword [ebp + 8]
lea edx, [esi - 1]
imul edx, ecx
sub eax, edx
cdq
idiv esi
mov edi, dword [ebp - 8]
mov dword [ebx + 0x60], esi
add ecx, eax
mov dword [ebx + 0x6c], eax
add eax, eax
cdq
idiv dword [ebx + 0x28]
cmp edi, 0xc
sete dl
mov dword [ebx + 0x68], ecx
mov esi, eax
movzx eax, byte [ebx + 0x38]
push eax
movzx eax, dl
push eax
lea ecx, [esi + 0x10]
push ecx
lea ecx, [ebx + 0x3c]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_CHanLib::Init_int__bool__bool_]
imul esi, edi
mov edx, dword [ebx + 0x1c]
mov eax, dword [edx + 0x18]
mov ecx, dword [ebx + 0x14]
push eax
push 0
push 1
push 0x1f4
push esi
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_CTextViewer::SetViewAttrib_int__int__bool__bool__int_]
cmp byte [ebx + 0x38], 0
mov ecx, dword [ebx + 0x20]
je 0x41a0da
mov eax, dword [ecx + 0x208]
add eax, dword [ecx + 0x200]
lea ecx, [eax + eax*4]
mov eax, dword [ebx + 0x30]
add ecx, ecx
sub eax, ecx
jmp 0x41a0f0
mov eax, dword [ecx + 0x20c]
add eax, dword [ecx + 0x204]
lea edx, [eax + eax*4]
mov eax, dword [ebx + 0x34]
add edx, edx
sub eax, edx
sub eax, dword [ebx + 0x28]
mov ecx, dword [ebx + 0x60]
cdq
idiv dword [ebx + 0x2c]
inc eax
imul ecx, eax
mov dword [ebx + 0x54], ecx
mov ecx, dword [ebx + 0x14]
mov dword [ebx + 0x64], eax
call dword [sym.imp.Ngs3.dll_public:_int___thiscall_CTextViewer::GetLineCount_void_const]
mov edi, 1
mov dword [ebx + 0x5c], eax
cmp eax, edi
jle 0x41a160
mov esi, dword [sym.imp.Ngs3.dll_public:_wchar_t_const____thiscall_CTextViewer::GetRelLine_int__int___int___bool_const]
nop
mov edx, dword [ebx + 0x5c]
mov ecx, dword [ebx + 0x14]
push edi
push 0
push 0
sub edx, edi
push edx
call esi
movzx ecx, word [eax]
test cx, cx
je 0x41a158
cmp cx, 0x20
je 0x41a144
cmp cx, 9
jne 0x41a152
movzx ecx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x41a138
jmp 0x41a158
cmp word [eax], 0
jne 0x41a160
dec dword [ebx + 0x5c]
cmp dword [ebx + 0x5c], edi
jg 0x41a120
mov eax, dword [ebx + 0x5c]
cdq
idiv dword [ebx + 0x54]
mov esi, eax
xor eax, eax
test edx, edx
setne al
add eax, esi
mov dword [ebx + 0x58], eax
mov eax, dword [ebx + 0x50]
cmp eax, 0xfffffffe
je 0x41a192
cmp eax, 0xffffffff
jne 0x41a1e6
mov ecx, dword [ebx + 0x4c]
mov dword [ecx], edi
mov edx, dword [ebx + 0x4c]
mov eax, dword [ebx + 0x58]
mov dword [edx + 4], eax
jmp 0x41a1e3
mov edx, dword [ebx + 0x18]
mov eax, dword [edx + 0x38]
lea ecx, [ebp - 0x38]
push ecx
push 0
push 0xbc9
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [ebp - 0x20]
push 0
lea ecx, [ebp - 8]
push ecx
mov ecx, dword [ebp - 0x1c]
lea edx, [ebp + 8]
push edx
push eax
push ecx
mov ecx, dword [ebx + 0x14]
call dword [sym.imp.Ngs3.dll_public:_bool___thiscall_CTextViewer::AbsToRel_int__int__int___int___int__const]
mov eax, dword [ebp + 8]
cdq
idiv dword [ebx + 0x54]
mov ecx, dword [ebx + 0x58]
sub ecx, edi
cmp eax, ecx
jl 0x41a1d7
mov eax, ecx
mov edx, dword [ebx + 0x4c]
inc eax
mov dword [edx + 4], eax
mov ecx, dword [ebx + 0x4c]
mov dword [ecx], eax
mov dword [ebx + 0x50], edi
xor esi, esi
cmp dword [ebx + 0x50], esi
jle 0x41a23b
lea ecx, [ecx]
mov edx, dword [ebx + 0x4c]
mov ecx, dword [edx + esi*8]
lea eax, [edx + esi*8]
cmp ecx, edi
ja 0x41a1ff
mov ecx, edi
mov dword [eax], ecx
mov edx, dword [ebx + 0x58]
cmp ecx, edx
jb 0x41a20a
mov ecx, edx
mov dword [eax], ecx
mov ecx, dword [eax + 4]
cmp ecx, edi
ja 0x41a215
mov ecx, edi
mov dword [eax + 4], ecx
mov edx, dword [ebx + 0x58]
cmp ecx, edx
jb 0x41a221
mov ecx, edx
mov dword [eax + 4], ecx
mov edx, dword [eax]
cmp ecx, edx
ja 0x41a22c
mov ecx, edx
mov dword [eax + 4], ecx
dec dword [eax]
dec dword [eax + 4]
add esi, edi
cmp esi, dword [ebx + 0x50]
jl 0x41a1f0
push 0x1f4
lea eax, [ebp - 0x290]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0
lea ecx, [ebp - 0x294]
push ecx
push 0
push 0x29
mov dword [ebp - 0x294], 0x1f4
call dword [sym.imp.USER32.dll_SystemParametersInfoW]
mov edx, dword [ebx + 0x24]
push 2
mov ecx, 0x17
lea esi, [ebp - 0xfc]
lea edi, [ebp - 0x9c]
push edx
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.GDI32.dll_SetMapMode]
mov ecx, dword [ebx + 0x28]
imul ecx, ecx, 0xffffffed
mov eax, 0x66666667
imul ecx
lea ecx, [ebp - 0x80]
push ecx
push 0
push 0
push 0
push 0
push 1
push 0
push 0
push 0
push 0
sar edx, 3
push 0
mov eax, edx
push 0
shr eax, 0x1f
add eax, edx
push 0
push eax
call dword [sym.imp.GDI32.dll_CreateFontW]
mov esi, eax
mov eax, dword [ebx + 0x78]
test eax, eax
je 0x41a2db
cmp eax, esi
je 0x41a2db
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov edi, dword [sym.imp.Ngs3.dll_public:_wchar_t____thiscall_C2bString::GetBuffer_int_]
push 0x64
push 0x64
lea ecx, [ebx + 0x70]
mov dword [ebx + 0x78], esi
call edi
push eax
push 0
push 0
push 2
push 0x800
call dword [sym.imp.KERNEL32.dll_GetDateFormatW]
push 0x64
push 0x64
lea ecx, [ebx + 0x74]
call edi
push eax
push 0
push 0
push 0
push 0x800
call dword [sym.imp.KERNEL32.dll_GetTimeFormatW]
mov esi, dword [sym.imp.Ngs3.dll_public:_void___thiscall_C2bString::ReleaseBuffer_int_]
push 0xffffffffffffffff
lea ecx, [ebx + 0x70]
call esi
push 0xffffffffffffffff
lea ecx, [ebx + 0x74]
call esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4