Function at 0x7318af90
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov ecx, dword [ebp + 8]
mov eax, 0x80
mov dword [ebp - 0x10], eax
cmp dword [ecx + 0x24], 0
je 0x7318afe0
push ebx
push esi
push edi
lea esp, [esp]
mov edi, eax
xor esi, esi
mov dword [ebp - 4], edi
mov dword [ebp - 0x18], edi
test eax, eax
je 0x7318affb
add eax, 0x20
je 0x7318afe4
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, eax
test edx, edx
jne 0x7318afe6
push 0x731556a8
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor edx, edx
mov eax, edx
mov ecx, 0x20
and eax, 0x1f
sub ecx, eax
mov dword [edx + ecx - 4], ecx
lea ebx, [edx + ecx]
jmp 0x7318affd
xor ebx, ebx
test ebx, ebx
je 0x7318afd2
mov edx, dword [ebp + 0xc]
mov eax, ebx
mov dword [ebp - 0xc], eax
mov ecx, ebx
mov dword [ebp - 8], ecx
mov dword [ebp - 0x14], eax
cmp edx, 1
ja 0x7318b052
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x7318b052
mov edi, 0x80
test edi, edi
je 0x7318b07c
lea eax, [edi + 0x20]
test eax, eax
je 0x7318b062
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, eax
test edx, edx
jne 0x7318b064
push 0x731556a8
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov edi, dword [ebp - 4]
xor esi, esi
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
cmp edx, 3
ja case.default.0x7318b05b
jmp dword [edx*4 + 0x7318b354]
xor edx, edx
mov eax, edx
mov ecx, 0x20
and eax, 0x1f
sub ecx, eax
mov eax, dword [ebp + 0x10]
mov dword [edx + ecx - 4], ecx
lea esi, [edx + ecx]
jmp 0x7318b07e
xor esi, esi
test esi, esi
je 0x7318b03c
mov ecx, dword [eax + 0x1c]
test ecx, ecx
je 0x7318b0ac
mov eax, dword [eax + 0x18]
test eax, eax
je 0x7318b094
mov eax, dword [eax]
jmp 0x7318b099
mov eax, 1
push eax
push ecx
push 0x73156a60
push edi
push esi
call fcn.73173430
add esp, 0x14
jmp 0x7318b0be
push dword [eax + 0x20]
push 0x73156a6c
push edi
push esi
call fcn.73173430
add esp, 0x10
test eax, eax
jns 0x7318b0e4
sub esi, dword [esi - 4]
je 0x7318b0ce
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp + 0x10]
add edi, edi
cmp edi, 0x10000
jb 0x7318b022
jmp 0x7318b047
push esi
push 0x100
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x10]
dec eax
push eax
push ebx
call fcn.7318a450
add esp, 0x18
test eax, eax
js case.default.0x7318b05b
mov eax, dword [ebp - 0x14]
mov ecx, eax
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov dword [ebp - 4], edi
jmp 0x7318b04f
dec edi
xor edx, edx
test ecx, ecx
jne 0x7318b129
test edi, edi
jne 0x7318b131
cmp edi, 0x7fffffff
jbe 0x7318b136
mov edx, 0x80070057
test edx, edx
js 0x7318b196
test edi, edi
jne 0x7318b159
test ecx, ecx
jne 0x7318b14c
mov edx, 0x80070057
jmp 0x7318b282
mov edx, 0x8007007a
mov dword [ebp - 0xc], ecx
jmp 0x7318b285
push ecx
push 0x73156ad4
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
push eax
mov edx, edi
call fcn.7318a5d0
mov ecx, dword [ebp - 0x1c]
mov edx, eax
add dword [ebp - 8], ecx
sub edi, ecx
test edx, edx
jns 0x7318b18b
cmp edx, 0x8007007a
jne 0x7318b282
mov ecx, dword [ebp - 8]
mov dword [ebp - 0xc], ecx
jmp 0x7318b285
test edi, edi
mov edi, dword [ebp - 4]
je 0x7318b285
mov byte [ecx], 0
jmp 0x7318b285
dec edi
xor edx, edx
test ecx, ecx
jne 0x7318b1b4
test edi, edi
jne 0x7318b1bc
cmp edi, 0x7fffffff
jbe 0x7318b1c1
mov edx, 0x80070057
test edx, edx
js 0x7318b196
test edi, edi
jne 0x7318b1d7
test ecx, ecx
jne 0x7318b23d
mov edx, 0x80070057
jmp 0x7318b282
push ecx
push 0x73156ae8
jmp 0x7318b24d
dec edi
xor edx, edx
test ecx, ecx
jne 0x7318b1ea
test edi, edi
jne 0x7318b1f2
cmp edi, 0x7fffffff
jbe 0x7318b1f7
mov edx, 0x80070057
test edx, edx
js 0x7318b196
test edi, edi
jne 0x7318b20a
test ecx, ecx
jne 0x7318b23d
mov edx, 0x80070057
jmp 0x7318b282
push ecx
push 0x73156b04
jmp 0x7318b24d
dec edi
xor edx, edx
test ecx, ecx
jne 0x7318b21d
test edi, edi
jne 0x7318b225
cmp edi, 0x7fffffff
jbe 0x7318b22a
mov edx, 0x80070057
test edx, edx
js 0x7318b27b
test edi, edi
jne 0x7318b247
test ecx, ecx
jne 0x7318b23d
mov edx, 0x80070057
jmp 0x7318b282
mov edx, 0x8007007a
mov dword [ebp - 0xc], ecx
jmp 0x7318b285
push ecx
push 0x73156b1c
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
push eax
mov edx, edi
call fcn.7318a5d0
mov ecx, dword [ebp - 8]
mov edx, eax
add ecx, dword [ebp - 0x1c]
sub edi, dword [ebp - 0x1c]
test edx, edx
jns 0x7318b276
cmp edx, 0x8007007a
jne 0x7318b282
mov dword [ebp - 0xc], ecx
jmp 0x7318b285
test edi, edi
je 0x7318b282
mov byte [ecx], 0
mov edi, dword [ebp - 4]
test edx, edx
js case.default.0x7318b05b
lea ecx, [edi - 1]
xor eax, eax
test ecx, ecx
je 0x7318b29a
cmp ecx, 0x7fffffff
jbe 0x7318b29f
mov eax, 0x80070057
test eax, eax
js 0x7318b2e6
lea eax, [ebp + 0x18]
mov dword [ebp - 0x1c], 0
push eax
push dword [ebp + 0x14]
lea edi, [ecx - 1]
mov ecx, dword [ebp - 0xc]
push edi
push ecx
call dword [sym.imp.msvcrt.dll__vsnprintf]
add esp, 0x10
test eax, eax
js 0x7318b2d8
cmp eax, edi
ja 0x7318b2d8
jne 0x7318b2d3
mov eax, dword [ebp - 0xc]
mov byte [edi + eax], 0
mov eax, dword [ebp - 0x1c]
jmp 0x7318b2f0
mov eax, dword [ebp - 0xc]
mov byte [edi + eax], 0
mov eax, 0x8007007a
jmp 0x7318b2f0
test ecx, ecx
je 0x7318b2f0
mov ecx, dword [ebp - 0xc]
mov byte [ecx], 0
test eax, eax
jns 0x7318b31d
test esi, esi
je 0x7318b304
sub esi, dword [esi - 4]
je 0x7318b304
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
sub ebx, dword [ebx - 4]
je 0x7318b310
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x10]
add eax, eax
mov dword [ebp - 0x10], eax
jmp 0x7318afb0
mov eax, dword [ebp + 8]
push ebx
push dword [eax + 0x24]
call fcn.731901b0
add esp, 8
test esi, esi
je 0x7318b33c
sub esi, dword [esi - 4]
je 0x7318b33c
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
sub ebx, dword [ebx - 4]
je 0x7318afdd
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret