Function at 0x10037390
Capabilities:
Create directory
Delete file
Set file attributes
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10082d46
mov eax, dword fs:[0]
push eax
sub esp, 0x248
mov eax, dword [0x100a6250]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov edx, dword [ebp + 8]
mov dword [ebp - 0x250], edx
test edx, edx
jne 0x100373d1
xor ecx, ecx
jmp 0x100373e5
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100373d6
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [esi + 0x24]
call fcn.10007190
call fcn.1002c620
mov edi, eax
mov dword [ebp - 0x254], edi
test edi, edi
je 0x1003780f
mov ebx, dword [esi + 8]
sub esp, 0x18
mov edx, esp
mov ecx, ebx
xor eax, eax
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 7
mov word [edx], ax
lea eax, [ecx + 2]
mov dword [ebp - 0x24c], eax
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10037430
sub ecx, dword [ebp - 0x24c]
sar ecx, 1
push ecx
push ebx
mov ecx, edx
call fcn.10006920
lea eax, [ebp - 0x230]
push eax
call fcn.1003ef50
add esp, 0x1c
cmp dword [eax + 0x14], 0x10
jb 0x10037463
mov eax, dword [eax]
push eax
call fcn.1002c650
push eax
push 0x1008e28c
push edi
call fcn.1002c510
mov edx, dword [ebp - 0x21c]
add esp, 0x10
cmp edx, 0x10
jb 0x100374b2
mov ecx, dword [ebp - 0x230]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x100374a8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1003782d
push edx
push ecx
call fcn.1001a759
add esp, 8
movd xmm0, dword [esi + 4]
sub esp, 8
cvtdq2pd xmm0, xmm0
movsd qword [esp], xmm0
call fcn.1002c5c0
push eax
push str.emType
push edi
call fcn.1002c510
mov eax, dword [esi + 0x18]
add esp, 0xc
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x100893c0]
movsd qword [esp], xmm0
call fcn.1002c5c0
push eax
push str.nBagSize
push edi
call fcn.1002c510
mov eax, dword [esi + 0x14]
add esp, 0xc
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x100893c0]
movsd qword [esp], xmm0
call fcn.1002c5c0
push eax
push str.nIndex
push edi
call fcn.1002c510
mov eax, dword [esi + 0x10]
add esp, 0xc
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x100893c0]
movsd qword [esp], xmm0
call fcn.1002c5c0
push eax
push str.size
push edi
call fcn.1002c510
mov ebx, dword [esi + 0x20]
add esp, 0x14
cmp dword [ebx - 0xc], 0
je 0x10037648
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 0xf
mov byte [ebp - 0x230], 0
sub esp, 0x18
mov dword [ebp - 4], 0
mov edx, esp
mov ecx, ebx
xor eax, eax
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 7
mov word [edx], ax
lea eax, [ecx + 2]
mov dword [ebp - 0x24c], eax
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100375c0
sub ecx, dword [ebp - 0x24c]
sar ecx, 1
push ecx
push ebx
mov ecx, edx
call fcn.10006920
lea eax, [ebp - 0x248]
push eax
call fcn.1003ef50
push eax
lea eax, [ebp - 0x230]
mov byte [ebp - 4], 1
push eax
call fcn.10008570
add esp, 0x24
lea ecx, [ebp - 0x248]
mov bl, al
call fcn.10006680
test bl, bl
je 0x10037636
cmp dword [ebp - 0x21c], 0x10
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
push eax
call fcn.1002c650
push eax
push str.state
push edi
call fcn.1002c510
add esp, 0x10
lea ecx, [ebp - 0x230]
mov dword [ebp - 4], 0xffffffff
call fcn.10006680
mov esi, dword [esi + 0xc]
sub esp, 0x18
mov edx, esp
mov ecx, esi
xor eax, eax
mov dword [edx + 0x10], 0
lea ebx, [ecx + 2]
mov dword [edx + 0x14], 7
mov word [edx], ax
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10037670
sub ecx, ebx
sar ecx, 1
push ecx
push esi
mov ecx, edx
call fcn.10006920
lea eax, [ebp - 0x230]
push eax
call fcn.1003ef50
add esp, 0x1c
cmp dword [eax + 0x14], 0x10
jb 0x1003769f
mov eax, dword [eax]
push eax
call fcn.1002c650
push eax
push 0x10088cd4
push edi
call fcn.1002c510
mov edx, dword [ebp - 0x21c]
add esp, 0x10
cmp edx, 0x10
jb 0x100376ee
mov ecx, dword [ebp - 0x230]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x100376e4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10037832
push edx
push ecx
call fcn.1001a759
add esp, 8
push edi
call fcn.1002c8a0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x10037806
mov edx, SysReAllocString
mov ecx, ebx
cmp byte [ecx], 0
je 0x10037713
inc ecx
sub edx, 1
jne 0x10037708
mov eax, SysReAllocString
mov esi, edx
sub eax, edx
neg esi
sbb esi, esi
and esi, eax
test edx, edx
je 0x100377fd
mov edi, dword [ebp - 0x250]
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.100456c0
lea ecx, [ebp - 0x218]
add esp, 0xc
mov eax, ecx
mov edx, 0x104
sub edi, eax
nop dword [eax + eax]
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x1003778e
movzx eax, word [ecx + edi]
test ax, ax
je 0x1003778e
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x10037770
lea eax, [ecx - 2]
test edx, edx
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push 0
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push dword [ebp - 0x250]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x100377f7
push 0
lea eax, [ebp - 0x24c]
push eax
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x254]
push ebx
call fcn.100492e8
add esp, 4
push edi
call fcn.1002c6d0
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1001a767
mov esp, ebp
pop ebp
ret 4
call fcn.1004906c
call fcn.1004906c
int3