Function at 0x10039500
Capabilities:
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1009ed99
mov eax, dword fs:[0]
push eax
sub esp, 0x2c8
mov eax, dword [0x100cba70]
xor eax, esp
mov dword [esp + 0x2c0], eax
push ebx
push esi
push edi
mov eax, dword [0x100cba70]
xor eax, esp
push eax
lea eax, [esp + 0x2d8]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x48], ecx
mov dword [esp + 0x70], 0xf
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
mov dword [esp + 0x2e0], ebx
mov edx, dword [0x100ad8f4]
push edx
mov esi, 0x100ccdf8
call fcn.100663e0
add esp, 4
test al, al
je 0x100395fb
push str.ScanCmd::saveToTempXmlFile:
lea ecx, [esp + 0x30]
call fcn.1008d3d0
lea ecx, [esp + 0x10]
push ecx
mov ecx, eax
mov byte [esp + 0x2e4], 1
call fcn.1008d7b0
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x64]
mov byte [esp + 0x2ec], 2
call fcn.100023e0
mov edi, 0x10
cmp dword [esp + 0x28], edi
jb 0x100395cf
mov eax, dword [esp + 0x14]
push eax
call fcn.10080518
add esp, 4
mov byte [esp + 0x2e0], bl
cmp dword [esp + 0x44], edi
mov dword [esp + 0x28], 0xf
mov dword [esp + 0x24], ebx
mov byte [esp + 0x14], bl
jb 0x10039600
mov ecx, dword [esp + 0x30]
push ecx
call fcn.10080518
add esp, 4
jmp 0x10039600
mov edi, 0x10
mov edx, dword [0x100ad8f4]
push 1
push edx
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x78], esp
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x84]
mov dword [ecx + 0x18], 0xf
mov dword [ecx + 0x14], ebx
push eax
mov byte [ecx + 4], bl
call fcn.100023e0
push 0x100ccdf8
mov byte [esp + 0x308], 3
call fcn.10002800
push eax
lea ecx, [esp + 0xa0]
mov byte [esp + 0x30c], bl
call fcn.1008d030
push 0x80
mov esi, 0x100ccdf8
mov byte [esp + 0x2e4], 4
call fcn.100663e0
add esp, 4
test al, al
je 0x10039713
push str._n_STRING_DATA_BEGINS__n
lea ecx, [esp + 0x30]
call fcn.1008d3d0
mov edx, dword [esp + 0x4c]
lea ecx, [esp + 0x10]
push ecx
push str._n__STRING_DATA_ENDS__
push edx
mov ecx, eax
mov byte [esp + 0x2ec], 5
call fcn.1008d660
mov ecx, eax
call fcn.1008d680
mov ecx, eax
call fcn.1008d7b0
mov byte [esp + 0x2e0], 6
call fcn.10002800
mov edx, dword [eax]
mov edx, dword [edx + 4]
lea ecx, [esp + 0x10]
push ecx
push 0x80
push esi
mov ecx, eax
call edx
cmp dword [esp + 0x28], edi
jb 0x100396e5
mov eax, dword [esp + 0x14]
push eax
call fcn.10080518
add esp, 4
mov esi, 0xf
mov byte [esp + 0x2e0], 4
cmp dword [esp + 0x44], edi
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], ebx
mov byte [esp + 0x14], bl
jb 0x10039718
mov ecx, dword [esp + 0x30]
push ecx
call fcn.10080518
add esp, 4
jmp 0x10039718
mov esi, 0xf
lea edx, [esp + 0xbc]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
cmp eax, 0x104
jb 0x10039868
cmp byte [esp + 0xb0], bl
je 0x1003983c
push str.ScanCmd::saveToTempXmlFile_return_xmlFileName
lea ecx, [esp + 0x30]
call fcn.1008d3d0
mov edx, dword [esp + 0x4c]
lea ecx, [esp + 0x10]
push ecx
push 0x100b37b4
push edx
mov ecx, eax
mov byte [esp + 0x2ec], 7
call fcn.1008d660
mov ecx, eax
call fcn.1008d680
mov ecx, eax
call fcn.1008d7b0
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x78]
mov byte [esp + 0x2e4], 8
call fcn.1008d180
cmp dword [esp + 0x28], edi
jb 0x100397a6
mov ecx, dword [esp + 0x14]
push ecx
call fcn.10080518
add esp, 4
mov byte [esp + 0x2e0], 4
cmp dword [esp + 0x44], edi
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], ebx
mov byte [esp + 0x14], bl
jb 0x100397cd
mov edx, dword [esp + 0x30]
push edx
call fcn.10080518
add esp, 4
cmp byte [esp + 0xb0], bl
je 0x1003983c
push ebx
lea ecx, [esp + 0x30]
call fcn.1008d450
lea ecx, [esp + 0x10]
push ecx
mov ecx, eax
mov byte [esp + 0x2e4], 9
call fcn.1008d7b0
lea edx, [esp + 0x10]
push edx
lea ecx, [esp + 0x78]
mov byte [esp + 0x2e4], 0xa
call fcn.1008ab90
cmp dword [esp + 0x28], edi
jb 0x1003981d
mov eax, dword [esp + 0x14]
push eax
call fcn.10080518
add esp, 4
cmp dword [esp + 0x44], edi
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], ebx
mov byte [esp + 0x14], bl
jb 0x1003983c
mov ecx, dword [esp + 0x30]
push ecx
call fcn.10080518
add esp, 4
lea ecx, [esp + 0x74]
mov byte [esp + 0x2e0], bl
call fcn.1008bb30
cmp dword [esp + 0x70], edi
jb 0x10039cd6
mov edx, dword [esp + 0x5c]
push edx
call fcn.10080518
add esp, 4
jmp 0x10039cd6
mov byte [esp + eax + 0xbc], bl
lea eax, [esp + 0x1c4]
push eax
push ebx
push 0x100b3750
lea ecx, [esp + 0xc8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
cmp eax, ebx
jne 0x100399c5
cmp byte [esp + 0xb0], bl
je 0x10039999
push str.Unable_to_generate_temp_file._return_xmlFileName
lea ecx, [esp + 0x30]
call fcn.1008d3d0
mov ecx, dword [esp + 0x48]
lea edx, [esp + 0x10]
push edx
push 0x100aec44
push ecx
mov ecx, eax
mov byte [esp + 0x2ec], 0xb
call fcn.1008d660
mov ecx, eax
call fcn.1008d680
mov ecx, eax
call fcn.1008d7b0
lea edx, [esp + 0x10]
push edx
lea ecx, [esp + 0x78]
mov byte [esp + 0x2e4], 0xc
call fcn.1008d180
cmp dword [esp + 0x28], edi
jb 0x10039903
mov eax, dword [esp + 0x14]
push eax
call fcn.10080518
add esp, 4
mov byte [esp + 0x2e0], 4
cmp dword [esp + 0x44], edi
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], ebx
mov byte [esp + 0x14], bl
jb 0x1003992a
mov ecx, dword [esp + 0x30]
push ecx
call fcn.10080518
add esp, 4
cmp byte [esp + 0xb0], bl
je 0x10039999
push ebx
lea ecx, [esp + 0x30]
call fcn.1008d450
lea edx, [esp + 0x10]
push edx
mov ecx, eax
mov byte [esp + 0x2e4], 0xd
call fcn.1008d7b0
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x78]
mov byte [esp + 0x2e4], 0xe
call fcn.1008ab90
cmp dword [esp + 0x28], edi
jb 0x1003997a
mov ecx, dword [esp + 0x14]
push ecx
call fcn.10080518
add esp, 4
cmp dword [esp + 0x44], edi
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], ebx
mov byte [esp + 0x14], bl
jb 0x10039999
mov edx, dword [esp + 0x30]
push edx
call fcn.10080518
add esp, 4
lea ecx, [esp + 0x74]
mov byte [esp + 0x2e0], bl
call fcn.1008bb30
cmp dword [esp + 0x70], edi
jb 0x10039cd6
mov eax, dword [esp + 0x5c]
push eax
call fcn.10080518
add esp, 4
jmp 0x10039cd6
push ebx
push 0x80
push 2
push ebx
push ebx
push 0xc0000000
lea ecx, [esp + 0x1dc]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x10039ab8
cmp byte [esp + 0xb0], bl
je 0x10039999
push str.Unable_to_open_temp_file._return_xmlFileName
lea ecx, [esp + 0x14]
call fcn.1008d3d0
mov ecx, dword [esp + 0x48]
lea edx, [esp + 0x2c]
push edx
push 0x100aec44
push ecx
mov ecx, eax
mov byte [esp + 0x2ec], 0xf
call fcn.1008d660
mov ecx, eax
call fcn.1008d680
mov ecx, eax
call fcn.1008d7b0
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x78]
mov byte [esp + 0x2e4], 0x10
call fcn.1008d180
lea ecx, [esp + 0x2c]
call fcn.10002a70
lea ecx, [esp + 0x10]
mov byte [esp + 0x2e0], 4
call fcn.10002a70
cmp byte [esp + 0xb0], bl
je 0x10039999
push ebx
lea ecx, [esp + 0x14]
call fcn.1008d450
lea ecx, [esp + 0x2c]
push ecx
mov ecx, eax
mov byte [esp + 0x2e4], 0x11
call fcn.1008d7b0
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x78]
mov byte [esp + 0x2e4], 0x12
call fcn.1008ab90
lea ecx, [esp + 0x2c]
call fcn.10002a70
lea ecx, [esp + 0x10]
call fcn.10002a70
jmp 0x10039999
mov eax, dword [esp + 0x4c]
cmp dword [eax + 0x18], edi
mov dword [esp + 0x50], ebx
jb 0x10039aca
mov edx, dword [eax + 4]
jmp 0x10039acd
lea edx, [eax + 4]
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x10039ad2
push ebx
lea ecx, [esp + 0x54]
push ecx
sub eax, edi
push eax
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
push esi
je 0x10039bf1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x48]
lea edx, [esp + 0x1c4]
push edx
mov ecx, esi
call fcn.10002ae0
cmp byte [esp + 0xb0], bl
je 0x10039bd1
push str.ScanCmd::saveToTempXmlFile_return_xmlFileName
lea ecx, [esp + 0x14]
call fcn.1008d3d0
lea ecx, [esp + 0x2c]
push ecx
push 0x100b37b4
push esi
mov ecx, eax
mov byte [esp + 0x2ec], 0x13
call fcn.1008d660
mov ecx, eax
call fcn.1008d680
mov ecx, eax
call fcn.1008d7b0
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x78]
mov byte [esp + 0x2e4], 0x14
call fcn.1008d180
lea ecx, [esp + 0x2c]
call fcn.10002a70
lea ecx, [esp + 0x10]
mov byte [esp + 0x2e0], 4
call fcn.10002a70
cmp byte [esp + 0xb0], bl
je 0x10039bd1
push 1
lea ecx, [esp + 0x14]
call fcn.1008d450
lea ecx, [esp + 0x2c]
push ecx
mov ecx, eax
mov byte [esp + 0x2e4], 0x15
call fcn.1008d7b0
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x78]
mov byte [esp + 0x2e4], 0x16
call fcn.1008ab90
lea ecx, [esp + 0x2c]
call fcn.10002a70
lea ecx, [esp + 0x10]
call fcn.10002a70
lea ecx, [esp + 0x74]
mov byte [esp + 0x2e0], bl
call fcn.1008bb30
lea ecx, [esp + 0x58]
call fcn.10002a70
mov al, 1
jmp 0x10039cd8
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [esp + 0xb0], bl
je 0x10039cbd
push str.ScanCmd::saveToTempXmlFile_return_xmlFileName
lea ecx, [esp + 0x14]
call fcn.1008d3d0
mov edx, dword [esp + 0x48]
lea ecx, [esp + 0x2c]
push ecx
push 0x100b37b4
push edx
mov ecx, eax
mov byte [esp + 0x2ec], 0x17
call fcn.1008d660
mov ecx, eax
call fcn.1008d680
mov ecx, eax
call fcn.1008d7b0
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x78]
mov byte [esp + 0x2e4], 0x18
call fcn.1008d180
lea ecx, [esp + 0x2c]
call fcn.10002a70
lea ecx, [esp + 0x10]
mov byte [esp + 0x2e0], 4
call fcn.10002a70
cmp byte [esp + 0xb0], bl
je 0x10039cbd
push ebx
lea ecx, [esp + 0x14]
call fcn.1008d450
lea ecx, [esp + 0x2c]
push ecx
mov ecx, eax
mov byte [esp + 0x2e4], 0x19
call fcn.1008d7b0
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x78]
mov byte [esp + 0x2e4], 0x1a
call fcn.1008ab90
lea ecx, [esp + 0x2c]
call fcn.10002a70
lea ecx, [esp + 0x10]
call fcn.10002a70
lea ecx, [esp + 0x74]
mov byte [esp + 0x2e0], bl
call fcn.1008bb30
lea ecx, [esp + 0x58]
call fcn.10002a70
xor al, al
mov ecx, dword [esp + 0x2d8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2c0]
xor ecx, esp
call fcn.10079ea5
mov esp, ebp
pop ebp
ret 4