Function at 0x404f80
Capabilities:
Print debug messages

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x41039c
push eax
mov eax, dword [0x41470c]
mov dword fs:[0], esp
sub esp, 0x144
push esi
xor esi, esi
cmp eax, esi
je 0x40502d
lea eax, [esp + 0x44]
push 0x104
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x44]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
lea edx, [esp + 0x44]
push 0x414738
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea ecx, [esp + 0x28]
call fcn.00404670
lea eax, [esp + 0x44]
lea ecx, [esp + 0x28]
push eax
mov dword [esp + 0x154], esi
call fcn.004046f0
push esi
push 0x414544
push 0x414730
lea ecx, [esp + 0x34]
call fcn.004047e0
cmp eax, 1
jne 0x405013
mov dword [0x417420], eax
lea ecx, [esp + 0x28]
mov dword [0x41470c], esi
mov dword [esp + 0x150], 0xffffffff
call fcn.004046b0
cmp dword [0x417420], esi
je 0x4051e2
mov cl, byte [esp + 7]
push ebp
push edi
mov byte [esp + 0x10], cl
push esi
lea ecx, [esp + 0x14]
call fcn.00401ce0
mov dl, byte [esp + 0xf]
push esi
lea ecx, [esp + 0x24]
mov dword [esp + 0x15c], 1
mov byte [esp + 0x24], dl
call fcn.00401ce0
mov esi, dword [esp + 0x160]
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov ebp, ecx
lea ecx, [esp + 0x24]
push ebp
call fcn.00402070
test al, al
je 0x4050ad
mov edi, dword [esp + 0x24]
mov ecx, ebp
mov eax, ecx
push ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x24]
call fcn.00402050
lea ecx, [esp + 0x20]
lea edx, [esp + 0x3c]
push ecx
push 0x414724
push edx
mov byte [esp + 0x164], 2
call fcn.004053f0
add esp, 0xc
mov ecx, dword [0x4111ac]
mov byte [esp + 0x158], 3
push ecx
push 0
push eax
lea ecx, [esp + 0x1c]
call fcn.00401990
push 1
lea ecx, [esp + 0x40]
mov byte [esp + 0x15c], 2
call fcn.00401ce0
mov eax, dword [esp + 0x24]
mov byte [esp + 0x158], 1
test eax, eax
je 0x405127
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x40511e
cmp al, 0xff
je 0x40511e
dec al
mov byte [ecx], al
jmp 0x405127
push ecx
call fcn.00405716
add esp, 4
mov edi, 0x414720
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [0x4111ac]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
mov ecx, dword [esp + 0x18]
sub edx, ecx
cmp edx, esi
ja 0x40514d
call fcn.00405721
test esi, esi
jbe 0x405194
mov eax, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x14]
lea ebp, [eax + esi]
push ebp
call fcn.00402070
test al, al
je 0x405194
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov ecx, esi
mov esi, 0x414720
lea edi, [eax + edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x18], ebp
mov byte [eax + ebp], 0
mov eax, dword [esp + 0x14]
pop edi
test eax, eax
pop ebp
jne 0x4051a3
mov eax, 0x4111b0
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x4051e2
mov al, byte [ecx - 1]
test al, al
je 0x4051d8
cmp al, 0xff
je 0x4051d8
dec al
pop esi
mov byte [ecx - 1], al
mov ecx, dword [esp + 0x144]
mov dword fs:[0], ecx
add esp, 0x150
ret
dec ecx
push ecx
call fcn.00405716
add esp, 4
mov ecx, dword [esp + 0x148]
pop esi
mov dword fs:[0], ecx
add esp, 0x150
ret