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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xdc
push ebx
push esi
xor esi, esi
push edi
push esi
push esi
push esi
push esi
lea eax, [esp + 0x4c]
xor ebx, ebx
push eax
mov dword [esp + 0x78], edx
mov dword [esp + 0x60], ecx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x2c], esi
call dword [sym.imp.USER32.dll_SetRect]
mov eax, 2
mov dword [esp + 0x3c], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x54], esi
nop
mov ecx, dword [esp + 0x4c]
cmp ebx, dword [ecx]
jge 0x5109c6
mov edx, dword [esp + 0x64]
cmp dword [edx], 0
mov edi, dword [ebp + 8]
je 0x51078a
mov edx, ebx
mov ecx, edi
call fcn.0055a010
test eax, eax
jle 0x510762
mov dword [esp + 0x28], 1
jmp case.0x51080f.4
cmp eax, 0xffffffff
jne 0x510776
inc ebx
mov dword [esp + 0x28], 1
mov dword [esp + 0x14], ebx
jmp 0x510730
cmp eax, 0xfffffffe
jne 0x51078a
inc ebx
mov dword [esp + 0x28], 1
mov dword [esp + 0x14], ebx
jmp 0x510730
mov eax, dword [ebp + 0xc]
cmp dword [eax], 0
je 0x5107ea
push ebx
push edi
call fcn.005946b3
add esp, 8
cmp eax, 1
mov dword [esp + 0x24], eax
jne 0x5107db
mov al, byte [ebx + edi + 1]
test al, al
jne 0x5107b7
inc ebx
mov dword [esp + 0x14], ebx
jmp 0x510730
mov ecx, dword [ebp + 8]
lea edi, [ebx + 1]
push edi
push ecx
call fcn.005946b3
add esp, 8
cmp eax, 2
je case.0x51080f.4
mov ebx, edi
mov dword [esp + 0x14], ebx
jmp 0x510730
cmp eax, 2
jne 0x5107ea
inc ebx
mov dword [esp + 0x14], ebx
jmp 0x510730
mov edx, dword [ebp + 8]
movzx eax, byte [ebx + edx]
lea edi, [ebx + edx]
add eax, 0xfffffffe
cmp eax, 0x1d
mov dword [esp + 0x24], 0
ja case.0x51080f.4
movzx eax, byte [eax + 0x511198]
jmp dword [eax*4 + 0x51117c]
test byte [ebp + 0x54], 4
jne case.0x51080f.4
mov ecx, dword [ebp + 0x10]
cmp dword [ecx], 0
je 0x510836
mov edx, dword [ebp + 0x14]
mov dword [edx], 1
jmp case.0x51080f.4
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
jne 0x510847
mov dword [eax], 1
lea esi, [ebx - 1]
mov eax, dword [ebp + 0x20]
mov edx, dword [eax]
xor ecx, ecx
test edx, edx
sete cl
mov dword [eax], ecx
jmp 0x5110bd
test byte [ebp + 0x54], 4
jne case.0x51080f.4
mov edx, dword [ebp + 0x10]
cmp dword [edx], 0
je 0x51087a
mov eax, dword [ebp + 0x14]
mov dword [eax], 1
jmp case.0x51080f.4
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
jne 0x51088b
mov dword [eax], 1
lea esi, [ebx - 1]
mov eax, dword [ebp + 0x24]
mov edx, dword [eax]
xor ecx, ecx
test edx, edx
sete cl
mov dword [eax], ecx
jmp 0x5110bd
test byte [ebp + 0x54], 4
jne case.0x51080f.4
mov edx, dword [ebp + 0x10]
cmp dword [edx], 0
je 0x5108be
mov eax, dword [ebp + 0x14]
mov dword [eax], 1
jmp case.0x51080f.4
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
jne 0x5108cf
mov dword [eax], 1
lea esi, [ebx - 1]
mov eax, dword [ebp + 0x28]
mov edx, dword [eax]
xor ecx, ecx
test edx, edx
sete cl
mov dword [eax], ecx
jmp 0x5110bd
test byte [ebp + 0x54], 4
jne case.0x51080f.4
mov edx, dword [ebp + 0x10]
cmp dword [edx], 0
je 0x510902
mov eax, dword [ebp + 0x14]
mov dword [eax], 1
jmp case.0x51080f.4
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
jne 0x510913
mov dword [eax], 1
lea esi, [ebx - 1]
mov ecx, dword [0x5c9d38]
call fcn.00435dc0
push eax
push 0
push 0
xor edx, edx
mov ecx, edi
call fcn.005101c0
add ebx, eax
mov dword [esp + 0x14], ebx
jmp 0x5110bd
test byte [ebp + 0x54], 4
jne case.0x51080f.4
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
jne 0x510952
mov dword [eax], 1
lea esi, [ebx - 1]
mov ecx, dword [ebp + 0x10]
cmp dword [ecx], 0
je 0x510968
mov edx, dword [ebp + 0x14]
mov dword [edx], 1
jmp case.0x51080f.4
mov eax, dword [ebp + 0x28]
mov ecx, dword [ebp + 0x24]
mov edx, dword [ebp + 0x20]
mov dword [eax], 0
mov dword [ecx], 0
mov dword [edx], 0
jmp 0x5110bd
test byte [ebp + 0x54], 4
jne case.0x51080f.4
cmp dword [ebp + 0x58], 9
jne case.0x51080f.4
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
je 0x5109af
mov eax, dword [ebp + 0x10]
cmp dword [eax], 0
jne 0x5109bb
mov eax, dword [ebp + 0x14]
mov dword [eax], 1
jmp case.0x51080f.4
mov dword [eax], 1
mov eax, dword [ebp + 0x10]
lea esi, [ebx - 1]
inc dword [eax]
jmp 0x5110bd
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x51110c
mov ecx, dword [ebp + 0x1c]
cmp dword [ecx], 0
jne 0x5109ef
mov edx, dword [esp + 0x4c]
mov eax, dword [edx]
cmp ebx, eax
mov esi, ebx
jl 0x5109e9
lea esi, [eax - 1]
mov dword [ecx], 1
mov dword [esp + 0x20], 1
mov eax, dword [esp + 0x18]
cmp eax, 0xffffffff
jne 0x510a06
mov eax, esi
mov dword [esp + 0x18], eax
mov ecx, dword [ebp + 0x1c]
cmp dword [ecx], 0
je 0x5110bd
test eax, eax
mov dword [ecx], 0
jl 0x510f38
test esi, esi
jl 0x510f38
cmp esi, eax
jl 0x510f38
sub esi, eax
inc esi
test esi, esi
mov dword [esp + 0x10], esi
jle 0x510f38
mov eax, dword [esp + 0x28]
test eax, eax
je 0x510a60
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x10]
push eax
lea edx, [esp + 0x1c]
call fcn.0055ad60
test eax, eax
je 0x510f38
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x510a9d
mov eax, dword [esp + 0x18]
test eax, eax
jle 0x510a9d
mov esi, dword [ebp + 8]
push eax
push esi
call fcn.005946b3
add esp, 8
cmp eax, 2
jne 0x510aa0
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
dec ecx
inc eax
mov dword [esp + 0x24], 1
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], eax
jmp 0x510aa8
mov esi, dword [ebp + 8]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x510b04
mov ecx, dword [esp + 0x18]
push ecx
push esi
call fcn.005946b3
add esp, 8
cmp eax, 1
jne 0x510afc
mov eax, dword [esp + 0x10]
cmp eax, 1
jne 0x510ace
mov dword [esp + 0x10], 2
jmp 0x510ad3
cmp eax, 2
jne 0x510b04
mov eax, dword [esp + 0x18]
mov cl, byte [eax + esi + 1]
test cl, cl
je 0x510f38
mov edx, dword [ebp + 8]
inc eax
push eax
push edx
call fcn.005946b3
add esp, 8
cmp eax, 2
jne 0x510f38
jmp 0x510b04
mov dword [esp + 0x24], 0
mov eax, dword [esp + 0x28]
xor esi, esi
xor ebx, ebx
cmp eax, esi
je 0x510b33
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
add ecx, eax
call fcn.005585f0
mov ebx, eax
cmp ebx, esi
je 0x510b33
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [esp + 0x10], eax
cmp ebx, esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x34], esi
je 0x510b81
mov edx, dword [esp + 0x10]
mov edi, dword [ebp + 0x2c]
push 1
push str.measuretext_fill
push esi
push edx
mov edx, ebx
mov ecx, edi
call fcn.0048cff0
mov eax, dword [esp + 0x10]
push esi
push str.measuretext_start
push esi
push eax
mov edx, ebx
mov ecx, edi
call fcn.0048cff0
cmp eax, esi
jle 0x510b81
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x2c]
lea edx, [esp + 0x78]
push edx
push eax
call dword [sym.imp.GDI32.dll_GetTextMetricsA]
mov ecx, dword [esp + 0x98]
mov edx, dword [ebp + 0x30]
mov dword [edx], ecx
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x38], esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x5c], esi
mov edi, dword [esp + 0x2c]
test ebx, ebx
mov eax, ecx
je 0x510bdd
cmp ecx, 0xffffffff
jne 0x510bc6
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [ebp + 0x2c]
lea ecx, [esp + 0x68]
push ecx
push eax
push ebx
push edx
call dword [sym.imp.GDI32.dll_GetTextExtentPointW]
mov eax, dword [esp + 0x68]
jmp 0x510c0e
mov edx, dword [ebp + 8]
mov esi, dword [esp + 0x18]
add edx, esi
cmp ecx, 0xffffffff
jne 0x510bf9
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x510bf0
sub eax, esi
lea ecx, [esp + 0x70]
push ecx
push eax
push edx
mov edx, dword [ebp + 0x2c]
push edx
call dword [sym.imp.GDI32.dll_GetTextExtentPointA]
mov eax, dword [esp + 0x70]
mov ecx, dword [ebp + 0x30]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x34]
sub eax, edx
mov edx, dword [esp + 0x3c]
add ecx, 0xfffffffe
add edx, eax
cmp edx, ecx
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x30], eax
jle 0x510e1b
mov edi, 1
cmp ecx, edi
mov dword [esp + 0x20], 2
mov dword [esp + 0x54], edi
jg 0x510c58
cmp dword [esp + 0x14], edi
jle 0x510e00
test ecx, ecx
jle 0x510e00
mov eax, dword [ebp + 0x38]
mov edx, dword [ebp + 0x28]
mov eax, dword [eax]
cmp eax, dword [edx]
je 0x510c66
mov dword [edx], eax
mov edx, dword [ebp + 0x3c]
mov eax, dword [edx]
mov edx, dword [ebp + 0x20]
cmp eax, dword [edx]
je 0x510c74
mov dword [edx], eax
mov eax, dword [ebp + 0x40]
mov edx, dword [ebp + 0x24]
mov eax, dword [eax]
cmp eax, dword [edx]
je 0x510c82
mov dword [edx], eax
mov esi, dword [esp + 0x38]
mov eax, ecx
sub eax, esi
cdq
sub eax, edx
sar eax, 1
test eax, eax
mov dword [esp + 0x2c], ecx
jg 0x510c99
mov eax, edi
sub ecx, eax
cmp ecx, esi
mov dword [esp + 0x10], ecx
jge 0x510ca9
mov ecx, esi
mov dword [esp + 0x10], ecx
test ebx, ebx
je 0x510dab
mov edi, ecx
mov cx, word [ebx + ecx*2]
call fcn.00558800
test eax, eax
je 0x510cd9
dec edi
test edi, edi
jle 0x510ce0
mov cx, word [ebx + edi*2]
call fcn.00558800
test eax, eax
je 0x510cd9
dec edi
test edi, edi
jg 0x510cc5
jmp 0x510cde
test edi, edi
jle 0x510ce0
dec edi
test edi, edi
jl 0x510de5
mov eax, dword [esp + 0x1c]
test eax, eax
lea ecx, [edi + 1]
mov dword [esp + 0x60], ebx
mov dword [esp + 0x58], 0xffffffff
mov dword [esp + 0x10], ecx
je 0x510d4c
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, esi
lea eax, [edx + eax*2]
nop
cmp esi, eax
jae 0x510d1d
cmp esi, ebx
je 0x510d21
add esi, 2
jne 0x510d10
cmp esi, ebx
jne 0x510d4c
mov edx, dword [esp + 0x1c]
mov esi, ebx
sub esi, edx
sar esi, 1
test esi, esi
jl 0x510d4c
mov eax, edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp esi, eax
jge 0x510d4c
mov ebx, dword [esp + 0x1c]
lea ecx, [esi + edi + 1]
mov dword [esp + 0x58], esi
mov dword [esp + 0x10], ecx
mov edx, dword [esp + 0x10]
mov ecx, ebx
call fcn.005586f0
test eax, eax
je 0x510ef3
mov ecx, eax
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x510d64
mov edx, dword [esp + 0x18]
sub ecx, esi
add ecx, edx
push eax
mov dword [esp + 0x18], ecx
call fcn.0059112a
mov eax, dword [esp + 0x20]
add esp, 4
test eax, eax
je 0x510da1
mov eax, dword [esp + 0x58]
cmp eax, 0xffffffff
je 0x510da1
mov ecx, dword [esp + 0x10]
mov ebx, dword [esp + 0x60]
sub ecx, eax
mov dword [esp + 0x10], ecx
jmp 0x510de9
mov ecx, dword [esp + 0x10]
mov ebx, dword [esp + 0x60]
jmp 0x510de9
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x510dd8
cmp ecx, edi
jle 0x510dd8
mov eax, dword [esp + 0x18]
mov edx, dword [ebp + 8]
lea ecx, [ecx + eax - 1]
push ecx
push edx
call fcn.005946b3
mov ecx, dword [esp + 0x18]
add esp, 8
cmp eax, edi
jne 0x510dd8
dec ecx
mov dword [esp + 0x10], ecx
mov eax, dword [esp + 0x18]
lea edx, [ecx + eax]
mov dword [esp + 0x14], edx
jmp 0x510de9
mov ecx, dword [esp + 0x10]
cmp ecx, 1
jle 0x510e00
mov eax, dword [esp + 0x5c]
inc eax
cmp eax, 0x40
mov dword [esp + 0x5c], eax
jl 0x510bb0
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x2c]
dec eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x30]
jns 0x510e1b
mov dword [esp + 0x14], 0
mov edx, dword [esp + 0x50]
inc edx
cmp edx, 0x40
mov dword [esp + 0x50], edx
jge 0x510e99
cmp ecx, dword [esp + 0x38]
je 0x510e99
cmp ecx, edi
mov dword [esp + 0x38], ecx
jge 0x510e99
mov eax, edi
sub eax, ecx
cdq
sub eax, edx
sar eax, 1
test eax, eax
jg 0x510e49
mov eax, 1
add ecx, eax
cmp ecx, edi
mov dword [esp + 0x10], ecx
jle 0x510e59
mov ecx, edi
mov dword [esp + 0x10], ecx
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x510bb4
cmp ecx, 1
jle 0x510bb4
mov eax, dword [esp + 0x18]
mov edx, dword [ebp + 8]
lea ecx, [ecx + eax - 1]
push ecx
push edx
call fcn.005946b3
mov ecx, dword [esp + 0x18]
add esp, 8
cmp eax, 1
jne 0x510bb4
inc ecx
mov dword [esp + 0x10], ecx
jmp 0x510bb4
mov edx, dword [esp + 0x3c]
mov edi, dword [esp + 0x1c]
add eax, edx
test edi, edi
mov dword [esp + 0x44], eax
mov dword [esp + 0x3c], eax
je 0x510f2b
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
sub esi, ecx
cmp eax, 2
lea ebx, [ebx + ecx*2]
mov dword [esp + 0x34], esi
je 0x510f14
test esi, esi
jle 0x510f14
mov ecx, dword [ebp + 0x2c]
push 0
push str.measuretext_next
push 1
push esi
mov edx, ebx
call fcn.0048cff0
test eax, eax
jle 0x510ee8
xor esi, esi
jmp 0x510b7d
mov dword [esp + 0x10], esi
xor esi, esi
jmp 0x510b81
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x510f2b
mov ecx, dword [ebp + 0x2c]
push 0
push str.measuretext_end
push 2
push 0
xor edx, edx
call fcn.0048cff0
mov ebx, esi
jmp 0x510f2b
mov ecx, dword [ebp + 0x2c]
push 0
push str.measuretext_end
push 2
push 0
xor edx, edx
call fcn.0048cff0
mov ebx, edi
test ebx, ebx
je 0x510f38
push ebx
call fcn.0059112a
add esp, 4
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebx]
test eax, eax
je 0x510fc2
mov esi, dword [esp + 0x3c]
mov dword [esp + 0x44], esi
jle 0x510fb8
mov edi, dword [ebp + 0x44]
test edi, edi
je 0x510fa5
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x510fa5
mov edx, dword [eax]
test edx, edx
jl 0x510f93
cmp edx, 0x32
jge 0x510f93
mov ecx, dword [edi + edx*4 + 0x794]
test ecx, ecx
mov eax, dword [edi + 0xa08]
jle 0x510f87
imul eax, ecx
mov ecx, dword [ebp + 0x18]
add eax, 2
inc edx
mov dword [ecx], edx
jmp 0x510fa7
mov ecx, dword [ebp + 0x18]
inc edx
lea eax, [eax + esi + 2]
mov dword [ecx], edx
jmp 0x510fa7
mov ecx, dword [edi + 0xa08]
lea eax, [ecx + esi + 2]
mov ecx, dword [ebp + 0x18]
inc edx
mov dword [ecx], edx
jmp 0x510fa7
mov eax, esi
mov ecx, dword [ebx]
dec ecx
mov esi, eax
mov eax, ecx
test eax, eax
mov dword [esp + 0x44], esi
mov dword [ebx], ecx
jg 0x510f52
mov dword [ebx], 0
mov dword [esp + 0x3c], esi
mov edx, dword [ebp + 0x28]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x38]
cmp dword [ecx], eax
je 0x510fd0
mov dword [ecx], eax
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x3c]
mov eax, dword [eax]
cmp dword [ecx], eax
jne 0x510fec
mov edx, dword [ebp + 0x40]
mov esi, dword [ebp + 0x24]
mov edx, dword [edx]
cmp edx, dword [esi]
je 0x5110aa
mov edx, dword [ebp + 0x40]
mov esi, dword [ebp + 0x48]
mov ebx, dword [ebp + 0x2c]
mov dword [ecx], eax
mov eax, dword [ebp + 0x24]
mov ecx, dword [eax]
mov dword [edx], ecx
mov eax, dword [esi]
test eax, eax
je 0x511012
push eax
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esi], 0
mov edi, dword [ebp + 0x4c]
mov eax, dword [edi]
test eax, eax
je 0x511028
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov dword [edi], 0
mov ecx, dword [ebp + 0x3c]
cmp dword [ecx], 0
mov eax, dword [ebp + 0x60]
je 0x51104c
xor edx, edx
cmp eax, 0x190
setne dl
dec edx
and edx, 0x12c
add edx, 0x190
mov eax, edx
mov ecx, dword [ebp + 0x6c]
mov edx, dword [ebp + 0x68]
push ecx
mov ecx, dword [ebp + 0x40]
push 0
push 0
push 0
push 0
push edx
mov edx, dword [ecx]
push 0
push edx
push 0
push eax
mov eax, dword [ebp + 0x64]
push 0
push 0
push 0
neg eax
push eax
call dword [sym.imp.GDI32.dll_CreateFontA]
test eax, eax
mov dword [edi], eax
je 0x511082
push eax
jmp 0x511086
mov ecx, dword [ebp + 0x70]
push ecx
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
lea edx, [esp + 0xb0]
push edx
push ebx
mov dword [esi], eax
call dword [sym.imp.GDI32.dll_GetTextMetricsA]
mov eax, dword [esp + 0xd0]
mov ecx, dword [ebp + 0x30]
mov dword [ecx], eax
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax]
mov edx, dword [esp + 0x14]
xor esi, esi
test ecx, ecx
mov dword [esp + 0x18], edx
jne 0x5110f2
mov ecx, dword [ebp + 0x34]
mov eax, dword [esp + 0x3c]
add ecx, 0xfffffffe
cmp eax, ecx
jl 0x5110d8
mov dword [esp + 0x20], 1
jmp 0x5109c2
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x5109c2
mov ebx, dword [esp + 0x14]
inc ebx
mov dword [esp + 0x14], ebx
jmp 0x510730
mov edx, dword [ebp + 0x14]
mov ebx, dword [esp + 0x14]
mov dword [edx], 0
mov dword [esp + 0x18], 0xffffffff
jmp 0x510730
mov eax, dword [ebp + 0x50]
mov ecx, dword [esp + 0x44]
mov dword [eax], ebx
mov al, byte [ebp + 0x54]
add ecx, 0xfffffffe
test al, 8
je 0x51112d
mov edx, dword [esp + 0x54]
test edx, edx
je 0x51112d
mov ecx, dword [ebp + 0x34]
add ecx, 0xfffffffe
test al, 1
je 0x51115c
test al, 2
je 0x511151
mov edx, dword [ebp + 0x5c]
mov ax, word [edx]
dec ax
movzx eax, ax
movzx ecx, cx
shl eax, 0x10
or eax, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x6c
mov eax, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x6c
test al, 2
je 0x51116f
mov edx, dword [ebp + 0x5c]
mov eax, dword [edx]
dec eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x6c
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x6c