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

Disassembly:
sub esp, 0x89c
push ebx
push ebp
mov ebp, dword [esp + 0x8a8]
test ebp, ebp
mov ebx, edx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x30], ecx
jne 0x4f919a
pop ebp
xor eax, eax
pop ebx
add esp, 0x89c
ret 8
cmp ebp, dword [ebx + 0x6c8]
je 0x4f91b7
mov eax, dword [ebp + 0x44]
mov ecx, dword [eax + 8]
cmp ecx, dword [ebp + 8]
jne 0x4f91b7
mov ebp, eax
cmp ebp, dword [ebx + 0x6c8]
jne 0x4f91a2
mov ecx, dword [ebx + 0x6e0]
xor edx, edx
cmp ebp, ecx
mov ecx, dword [ebp]
sete dl
mov dword [esp + 0x24], ebp
mov dword [esp + 0x54], edx
lea edx, [esp + 0x4bc]
sub edx, ecx
mov al, byte [ecx]
mov byte [edx + ecx], al
inc ecx
test al, al
jne 0x4f91d8
mov ecx, dword [ebp + 0x40]
test ecx, ecx
lea eax, [ebp + 0x40]
push esi
push edi
mov dword [esp + 0x24], eax
je 0x4f92a3
jmp 0x4f9200
mov eax, dword [ebp + 8]
cmp eax, dword [ecx + 8]
jne 0x4f92a3
mov ebp, ecx
mov eax, dword [ebp + 0x10]
test eax, eax
mov edx, dword [ebp]
jle 0x4f9238
cmp byte [edx], 0x20
jne 0x4f922e
lea ecx, [ecx]
test eax, eax
jle 0x4f922e
mov cl, byte [edx + 1]
inc edx
dec eax
cmp cl, 0x20
je 0x4f9220
cmp byte [edx], 0
jne 0x4f9238
mov edx, 0x575258
lea ecx, [esp + 0x4c4]
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4f9242
sub ecx, esi
mov esi, ecx
mov ecx, edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4f9252
sub ecx, edi
add ecx, esi
cmp ecx, 0x3b5
ja 0x4f92a3
mov ecx, edx
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4f9267
sub ecx, edx
lea edi, [esp + 0x4c4]
mov eax, ecx
dec edi
lea ebx, [ebx]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4f9280
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0x40]
test ecx, ecx
jne 0x4f9200
lea eax, [esp + 0x4c4]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4f92b0
sub eax, edx
mov esi, eax
test esi, esi
jg 0x4f92e1
mov ecx, dword [esp + 0x8b4]
pop edi
mov dword [ebp + 0x14], ecx
mov edx, dword [ebx + 0x9e0]
pop esi
mov dword [ebp + 0x18], edx
mov eax, ebp
pop ebp
pop ebx
add esp, 0x89c
ret 8
mov edi, dword [esp + 0x24]
mov edx, dword [edi]
test edx, edx
mov ebp, dword [esp + 0x2c]
je 0x4f931c
nop
mov eax, dword [ebp + 8]
cmp eax, dword [edx + 8]
jne 0x4f931c
mov ecx, dword [ebx + 0x6c8]
call fcn.004c2730
mov ecx, dword [ebx + 0x6f4]
dec ecx
mov dword [ebx + 0x6c8], eax
mov dword [ebx + 0x6f4], ecx
mov edx, dword [edi]
test edx, edx
jne 0x4f92f0
mov ecx, dword [ebx + 0x6f4]
mov eax, dword [0x589b90]
mov edx, dword [0x59c688]
mov dword [esp + 0x54], ecx
mov ecx, dword [0x59c690]
mov dword [esp + 0x50], eax
mov eax, dword [ebp + 8]
mov dword [0x59c688], eax
mov dword [esp + 0x6c], edx
mov edx, dword [0x59c6b0]
mov dword [esp + 0x60], ecx
mov ecx, dword [ebx + 0x6c8]
mov dword [ebx + 0x6c8], 0
mov dword [esp + 0x58], edx
mov edx, dword [ebp + 0xc]
mov dword [0x589b90], edx
mov edx, dword [ebp + 0x10]
test edx, edx
mov dword [0x59c690], edx
mov eax, dword [ebp + 0x20]
mov dword [esp + 0x64], ecx
mov ecx, dword [ebp + 4]
mov dword [esp + 0x44], eax
mov dword [0x59c6b0], ecx
mov byte [esp + 0x84], 0
jle 0x4f93cb
cmp edx, 0x19
jle 0x4f93a7
mov edx, 0x19
mov dword [0x59c690], edx
mov ecx, edx
mov ebp, ecx
shr ecx, 2
mov eax, 0x20202020
lea edi, [esp + 0x84]
rep stosd dword es:[edi], eax
mov ecx, ebp
and ecx, 3
rep stosb byte es:[edi], al
mov byte [esp + edx + 0x84], 0
mov edx, dword [ebx + 0x96c]
mov edi, dword [esp + 0x38]
xor eax, eax
push edx
push edi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x24], eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x20], eax
mov eax, dword [0x589b90]
xor ebx, ebx
cmp eax, ebx
jg 0x4f941a
lea eax, [esp + 0xa4]
push eax
push edi
call dword [sym.imp.GDI32.dll_GetTextMetricsA]
mov ecx, dword [esp + 0xc4]
mov dword [esp + 0x3c], ecx
jmp 0x4f941e
mov dword [esp + 0x3c], ebx
lea esi, [esp + esi + 0x4c4]
lea eax, [esp + 0x4c4]
cmp eax, esi
lea edx, [esp + 0x4c4]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x14], edx
mov dword [esp + 0x24], esi
jae 0x4f98e7
mov eax, dword [esp + 0x30]
test eax, eax
je 0x4f94ab
mov eax, dword [0x59c690]
test eax, eax
je 0x4f94ab
xor eax, eax
lea ebx, [ebx]
mov cl, byte [esp + eax + 0x84]
mov byte [esp + eax + 0xdc], cl
inc eax
test cl, cl
jne 0x4f9460
mov eax, dword [esp + 0x14]
mov edx, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4f9480
lea edi, [esp + 0xdc]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4f9491
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x4f94c2
mov eax, dword [esp + 0x14]
lea edx, [esp + 0xdc]
sub edx, eax
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x4f94b8
lea eax, [esp + 0xdc]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4f94d0
mov edi, dword [0x589b90]
sub eax, edx
dec eax
test edi, edi
mov dword [esp + 0x40], eax
jg 0x4f9785
xor edi, edi
test eax, eax
mov dword [esp + 0x18], 2
jl 0x4f9756
mov ebp, dword [esp + 0x28]
mov ebx, dword [esp + 0x38]
jmp 0x4f9510
mov eax, dword [0x59f66c]
test eax, eax
je 0x4f95f6
lea ecx, [esp + 0xdc]
push edi
push ecx
call fcn.00565618
add esp, 8
cmp eax, 1
je 0x4f953c
cmp eax, 2
jne 0x4f95f6
mov dword [esp + 0x4c], 1
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4f96b8
mov edx, dword [esp + 0x10]
cmp dword [esp + 0x48], edx
mov dword [esp + 0x1c], 0
je 0x4f96b8
mov eax, dword [esp + 0x20]
mov esi, dword [sym.imp.GDI32.dll_SelectObject]
push eax
push ebx
call esi
mov eax, dword [esp + 0x34]
test eax, eax
je 0x4f9583
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [esp + 0x10]
test eax, eax
mov dword [esp + 0x48], eax
je 0x4f9686
mov eax, dword [ebp + 0x9d8]
xor ecx, ecx
cmp eax, 0x190
setle cl
lea edx, [ebp + 0x970]
push edx
mov edx, dword [ebp + 0x9d4]
push 0
push 0
push 0
dec ecx
push 0
and ecx, 0xfffffed4
add ecx, 0x2bc
mov eax, ecx
mov ecx, dword [ebp + 0x9dc]
push ecx
push 0
push 0
push 0
push eax
push 0
push 0
push 0
neg edx
push edx
call dword [sym.imp.GDI32.dll_CreateFontA]
test eax, eax
mov dword [esp + 0x34], eax
je 0x4f967d
push eax
jmp 0x4f9695
movzx eax, byte [esp + edi + 0xdc]
lea esi, [esp + edi + 0xdc]
add eax, 0xfffffffe
cmp eax, 0x1d
mov dword [esp + 0x4c], 0
ja case.0x4f9620.4
movzx edx, byte [eax + 0x4f99b4]
jmp dword [edx*4 + 0x4f99a0]
mov ecx, dword [esp + 0x10]
xor eax, eax
test ecx, ecx
sete al
mov dword [esp + 0x1c], 1
mov dword [esp + 0x10], eax
jmp case.0x4f9620.22
mov ecx, dword [0x594088]
call fcn.00431e50
push eax
push 0
lea ecx, [esp + 0x78]
push ecx
lea edx, [esp + 0x74]
mov ecx, esi
call fcn.004f8d50
add edi, eax
jmp case.0x4f9620.22
mov dword [esp + 0x10], 0
mov dword [esp + 0x1c], 1
jmp case.0x4f9620.22
mov eax, dword [ebp + 0x96c]
push eax
jmp 0x4f9695
mov ecx, dword [ebp + 0x96c]
mov dword [esp + 0x34], 0
push ecx
push ebx
call esi
lea edx, [esp + 0xa4]
push edx
push ebx
mov dword [esp + 0x28], eax
call dword [sym.imp.GDI32.dll_GetTextMetricsA]
mov esi, dword [esp + 0xc4]
mov dword [esp + 0x3c], esi
jmp 0x4f96bc
mov esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x4f96ec
lea eax, [esp + 0x74]
push eax
push 1
lea ecx, [esp + edi + 0xe4]
push ecx
push ebx
call dword [sym.imp.GDI32.dll_GetTextExtentPointA]
mov edx, dword [esp + 0x74]
mov eax, dword [esp + 0x18]
sub edx, esi
add eax, edx
mov dword [esp + 0x18], eax
jmp case.0x4f9620.22
cmp dword [ebp + 0x700], 9
jne 0x4f9716
cmp byte [esp + edi + 0xdc], 9
jne 0x4f9716
mov eax, dword [esp + 0x18]
push eax
mov edx, 2
mov ecx, ebp
call fcn.004f8f60
mov dword [esp + 0x18], eax
jmp case.0x4f9620.22
lea ecx, [esp + 0x7c]
push ecx
push 1
lea edx, [esp + edi + 0xe4]
push edx
push ebx
call dword [sym.imp.GDI32.dll_GetTextExtentPointA]
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x18]
sub eax, esi
add ecx, eax
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x8b4]
cmp dword [esp + 0x18], ecx
jge 0x4f9756
mov eax, dword [esp + 0x40]
inc edi
cmp edi, eax
jle 0x4f9510
dec edi
cmp edi, 0xa
jge 0x4f9761
mov edi, 0xa
mov eax, dword [0x59f66c]
test eax, eax
je 0x4f9781
lea edx, [esp + 0xdc]
push edi
push edx
call fcn.00565618
add esp, 8
cmp eax, 1
jne 0x4f9781
dec edi
mov eax, dword [esp + 0x40]
cmp edi, eax
jg 0x4f978d
mov esi, edi
jne 0x4f9796
mov eax, dword [esp + 0x24]
jmp 0x4f989f
mov ebx, dword [esp + 0x10]
mov eax, edi
cdq
and edx, 3
add eax, edx
sar eax, 2
mov ebp, edi
sub ebp, eax
mov eax, dword [0x59f66c]
test eax, eax
mov dword [esp + 0x68], edi
je 0x4f97cf
lea ecx, [esp + 0xdc]
push edi
push ecx
call fcn.00565618
add esp, 8
cmp eax, 2
jne 0x4f97cf
lea esi, [ebp - 1]
cmp esi, ebp
jl 0x4f981d
cmp byte [esp + esi + 0xdc], 0x20
je 0x4f9819
mov eax, dword [0x59f66c]
test eax, eax
je 0x4f9801
lea edx, [esp + 0xdc]
push esi
push edx
call fcn.00565618
add esp, 8
cmp eax, 1
je 0x4f9814
cmp eax, 2
je 0x4f9814
cmp byte [esp + esi + 0xdc], 2
jne 0x4f9814
xor eax, eax
test ebx, ebx
sete al
mov ebx, eax
dec esi
cmp esi, ebp
jge 0x4f97d3
cmp esi, ebp
jg 0x4f9821
mov esi, edi
jmp 0x4f9833
cmp dword [esp + 0x10], ebx
je 0x4f9833
mov dword [esp + 0x10], ebx
mov dword [esp + 0x1c], 1
mov eax, dword [0x59f66c]
test eax, eax
je 0x4f9857
lea ecx, [esp + 0xdc]
push esi
push ecx
call fcn.00565618
add esp, 8
cmp eax, 1
jne 0x4f9857
test esi, esi
jle 0x4f9857
dec esi
mov ecx, dword [esp + 0x30]
test ecx, ecx
mov eax, dword [0x59c690]
mov byte [esp + esi + 0xdd], 0
je 0x4f9897
test eax, eax
je 0x4f9887
lea edx, [esi + 1]
cmp edx, eax
jg 0x4f9887
dec eax
mov dword [0x59c690], eax
mov byte [esp + eax + 0x84], 0
jmp 0x4f98d9
sub esi, eax
mov eax, dword [esp + 0x14]
lea ecx, [eax + esi + 1]
mov dword [esp + 0x14], ecx
jmp 0x4f98a3
mov edx, dword [esp + 0x14]
lea eax, [edx + esi + 1]
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x2c]
mov eax, dword [edx + 0x1c]
push ecx
mov ecx, dword [esp + 0x8b8]
push eax
push ecx
mov ecx, dword [esp + 0x34]
lea edx, [esp + 0xe8]
call fcn.004f9000
mov eax, dword [esp + 0x30]
inc eax
mov dword [esp + 0x44], 0
mov dword [esp + 0x30], eax
mov edx, dword [esp + 0x14]
cmp edx, dword [esp + 0x24]
jb 0x4f9447
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x38]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov eax, dword [esp + 0x34]
test eax, eax
je 0x4f9906
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [esp + 0x50]
mov edx, dword [esp + 0x6c]
mov ecx, dword [esp + 0x60]
mov edi, dword [esp + 0x28]
mov dword [0x589b90], eax
mov eax, dword [esp + 0x5c]
test eax, eax
mov dword [0x59c688], edx
mov edx, dword [esp + 0x58]
mov dword [0x59c690], ecx
mov dword [0x59c6b0], edx
je 0x4f9945
mov eax, dword [edi + 0x6c8]
mov dword [edi + 0x6e0], eax
mov ebx, dword [edi + 0x6f4]
mov esi, dword [esp + 0x54]
mov eax, dword [edi + 0x6c8]
mov ecx, dword [esp + 0x64]
add esi, ebx
mov ebx, dword [esp + 0x2c]
push eax
mov edx, ebx
mov dword [edi + 0x6c8], ecx
call fcn.004c27b0
mov dword [edi + 0x6c8], eax
mov dword [edi + 0x6f4], esi
mov esi, dword [ebx + 0x44]
mov edx, ebx
mov ecx, eax
call fcn.004c2730
mov dword [edi + 0x6c8], eax
dec dword [edi + 0x6f4]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x89c
ret 8