Function at 0x64845e04
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov edx, dword [ebp + 0xc]
mov dword [ebp - 4], edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 8], ebx
test edx, edx
jne 0x64845d94
mov eax, dword [edi]
mov dword [esp], eax
call sub.msvcrt.dll_free
xor eax, eax
mov dword [edi], 0
mov ebx, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [0x6488f038]
mov eax, 0xffffffff
test ecx, ecx
je 0x64845d88
mov eax, dword [ebp + 8]
test eax, eax
je 0x64845daf
cmp edx, 3
jg 0x64845db6
mov eax, 0xfffffffe
jmp 0x64845d88
mov eax, dword [ebp + 8]
cmp dword [eax], 5
jbe 0x64845dc5
mov eax, 0xfffffffd
jmp 0x64845d88
mov eax, dword [eax]
jmp dword [eax*4 + 0x6485c884]
mov eax, dword [ebp + 8]
add eax, 4
mov dword [esp], eax
call sub.msvcrt.dll_atol
mov edx, 0x7530
test eax, eax
cmovg edx, eax
mov dword [0x64858154], edx
jmp case.0x64845dc7.0
mov edx, dword [ecx]
mov eax, edx
xor ax, ax
cmp eax, 0xffff0000
je 0x648460e7
xor eax, eax
jmp 0x64845d88
mov dword [0x64858150], 1
mov edx, dword [ecx]
mov eax, edx
xor ax, ax
cmp eax, 0xffff0000
jne 0x64845e00
test dl, 1
je 0x64845e46
mov eax, dword [0x64858148]
test eax, eax
jne 0x64846160
mov dword [0x64858148], 0
mov edx, dword [ecx]
mov eax, edx
xor ax, ax
cmp eax, 0xffff0000
jne 0x64845e00
and edx, 2
je 0x64845e00
mov eax, dword [0x6485814c]
mov dword [esp], eax
call fcn.64846a30
test eax, eax
jns 0x64845e00
mov dword [esp], str.sadumm_end_fail__n
call sub.KERNEL32.dll_OutputDebugStringA
xor eax, eax
sub esp, 4
jmp 0x64845d88
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov dword [ebp - 0x14], eax
mov eax, dword [ecx + 0x1c]
add eax, 0x10
lea edx, [eax + 0x18]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0
mov ecx, dword [ebp + 8]
mov dword [esp + 8], 0x18
mov eax, dword [ecx + 4]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_strncpy
mov eax, dword [ebp - 0x10]
mov ecx, 8
cld
mov byte [eax + 0x17], 0
mov edi, dword [ebp - 0xc]
xor eax, eax
rep stosd dword es:[edi], eax
mov dword [esp + 8], 0x20
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_strncpy
mov eax, dword [ebp - 0xc]
mov byte [eax + 0x1f], 0
mov ecx, dword [0x6488f038]
mov edx, dword [ecx]
mov eax, edx
xor ax, ax
cmp eax, 0xffff0000
je 0x6484611d
xor eax, eax
mov dword [0x64858150], 1
jmp 0x64845d88
mov edx, dword [ebp + 8]
mov dword [esp + 8], 0x8000
mov eax, dword [edx + 4]
mov dword [esp + 4], eax
mov eax, dword [ecx + 4]
mov dword [esp], eax
call sub.msvcrt.dll_strncpy
mov ebx, dword [0x6488f038]
mov eax, dword [ebx + 4]
mov byte [eax + 0x7fff], 0
mov edi, dword [ebx + 4]
jmp 0x64845f68
mov byte [eax], 0
lea edi, [eax + 1]
mov dword [esp + 4], 0x7c
mov dword [esp], edi
call sub.msvcrt.dll_strchr
test eax, eax
jne 0x64845f62
mov dword [esp + 4], 0
mov dword [esp], edi
call sub.msvcrt.dll_strchr
mov byte [eax + 1], 0
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 8]
test eax, eax
je 0x64845fbd
mov dword [esp + 8], 0x10
mov dword [esp + 4], eax
mov eax, dword [ebx + 8]
mov dword [esp], eax
call sub.msvcrt.dll_strncpy
mov eax, dword [0x6488f038]
mov eax, dword [eax + 8]
mov byte [eax + 0xf], 0
mov edx, dword [ebp + 8]
mov dword [esp + 8], 0x400
mov eax, dword [edx + 0xc]
mov dword [esp + 4], eax
mov eax, dword [0x6488f038]
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_strncpy
mov edx, dword [0x6488f038]
mov eax, dword [edx + 0xc]
mov byte [eax + 0x3ff], 0
mov ecx, dword [ebp + 8]
mov dword [esp + 8], 0x20
mov eax, dword [ecx + 0x10]
mov dword [esp + 4], eax
mov eax, dword [edx + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_strncpy
mov edx, dword [0x6488f038]
mov eax, dword [edx + 0x10]
mov byte [eax + 0x1f], 0
mov ecx, dword [ebp + 8]
mov dword [esp + 8], 0x10
mov eax, dword [ecx + 0x14]
mov dword [esp + 4], eax
mov eax, dword [edx + 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_strncpy
mov edx, dword [0x6488f038]
mov eax, dword [edx + 0x14]
mov byte [eax + 0xf], 0
mov ecx, dword [ebp + 8]
mov dword [esp + 8], 0x10
mov eax, dword [ecx + 0x18]
mov dword [esp + 4], eax
mov eax, dword [edx + 0x18]
mov dword [esp], eax
call sub.msvcrt.dll_strncpy
mov edx, dword [0x6488f038]
mov eax, dword [edx + 0x18]
mov byte [eax + 0xf], 0
mov ecx, dword [ebp + 8]
mov dword [esp + 8], 0x10
mov eax, dword [ecx + 0x1c]
mov dword [esp + 4], eax
mov eax, dword [edx + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_strncpy
mov edx, dword [0x6488f038]
mov eax, dword [edx + 0x1c]
mov byte [eax + 0xf], 0
mov ecx, dword [edx]
mov eax, ecx
xor ax, ax
cmp eax, 0xffff0000
jne 0x64845e00
and ecx, 2
je 0x64845e00
mov dword [esp], edx
call fcn.64846e90
test eax, eax
mov dword [0x6485814c], eax
jne 0x64845e00
mov dword [esp], str.sadumm_init_fail__n
call sub.KERNEL32.dll_OutputDebugStringA
xor eax, eax
mov dword [0x6485814c], 0
sub esp, 4
jmp 0x64845d88
and edx, 2
je 0x64845e00
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
test edx, edx
je 0x64845e00
mov eax, dword [ecx + 8]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov eax, dword [0x6485814c]
mov dword [esp], eax
call fcn.64846990
xor eax, eax
jmp 0x64845d88
test dl, 2
jne 0x64846177
and edx, 1
je 0x64845f1f
lea eax, [ebp - 0x14]
mov dword [esp + 4], eax
mov dword [esp], ecx
call fcn.648456c0
test eax, eax
mov dword [0x64858148], eax
jne 0x64845f1f
mov dword [esp], str.msgCtrl_open_fail__n
call sub.KERNEL32.dll_OutputDebugStringA
sub esp, 4
jmp 0x64845f1f
mov dword [esp], eax
call fcn.64845aa0
test eax, eax
js 0x648461ac
mov ecx, dword [0x6488f038]
jmp 0x64845e2e
lea eax, [ebp - 0x14]
mov dword [esp + 4], eax
mov eax, dword [0x6485814c]
mov dword [esp], eax
call fcn.64846a90
test eax, eax
js 0x648461c6
mov ecx, dword [0x6488f038]
mov edx, dword [ecx]
mov eax, edx
xor ax, ax
cmp eax, 0xffff0000
jne 0x64845f1f
jmp 0x64846122
mov dword [esp], str.msgCtrl_close_fail__n
call sub.KERNEL32.dll_OutputDebugStringA
mov ecx, dword [0x6488f038]
sub esp, 4
jmp 0x64845e2e
mov dword [esp], str.sadumm_open_fail__n
call sub.KERNEL32.dll_OutputDebugStringA
sub esp, 4
jmp 0x6484618f