Function at 0x3001d298
Capabilities:
Print debug messages
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98
push esi
push edi
cmp dword [ebp + 8], 0
je 0x3001d2af
cmp dword [ebp + 8], 0xffffffff
jne 0x3001d2c0
push 0x30001c70
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
call dword [sym.imp.KERNEL32.DLL_DebugBreak]
cmp dword [ebp + 0x10], 0
jne 0x3001d2d7
push 0x30001c70
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
call dword [sym.imp.KERNEL32.DLL_DebugBreak]
cmp dword [ebp + 0xc], 0
jne 0x3001d2ee
push 0x30001c70
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
call dword [sym.imp.KERNEL32.DLL_DebugBreak]
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 0x18]
mov dword [ebp - 0x80], ecx
push 0
push 0
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x40]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
xor edx, edx
cmp eax, 0xffffffff
setne dl
mov dword [ebp - 0x90], edx
cmp dword [ebp - 0x90], 0
jne 0x3001d32a
xor eax, eax
jmp 0x3001d60d
push 0
lea eax, [ebp - 0x8c]
push eax
push 4
lea ecx, [ebp - 0x80]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov dword [ebp - 0x90], eax
cmp dword [ebp - 0x90], 0
je 0x3001d35b
cmp dword [ebp - 0x8c], 4
je 0x3001d362
xor eax, eax
jmp 0x3001d60d
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x40]
add ecx, 4
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x40], ecx
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 0x2c]
mov dword [ebp - 0x7c], ecx
mov edx, dword [ebp + 0x10]
add edx, 0x2c
cmp dword [ebp - 0x7c], edx
je 0x3001d608
mov eax, dword [ebp - 0x7c]
sub eax, 0x284
mov dword [ebp - 0x84], eax
mov ecx, dword [ebp - 0x7c]
mov edx, dword [ecx]
mov dword [ebp - 0x7c], edx
mov eax, dword [ebp - 0x84]
mov ecx, dword [eax + 0x270]
and ecx, 1
test ecx, ecx
jne 0x3001d3b4
jmp 0x3001d37a
lea edx, [ebp - 0x88]
push edx
mov eax, dword [ebp - 0x84]
mov ecx, dword [eax + 0x26c]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.3001cc1a
mov dword [ebp - 0x90], eax
cmp dword [ebp - 0x90], 0
jne 0x3001d3eb
xor eax, eax
jmp 0x3001d60d
mov ecx, dword [ebp - 0x84]
mov edx, dword [ecx + 0x270]
and edx, 8
test edx, edx
je 0x3001d451
mov eax, dword [ebp - 0x84]
cmp dword [eax + 0x50], 0
je 0x3001d451
mov ecx, dword [ebp - 0x84]
cmp dword [ecx + 0x54], 0
je 0x3001d451
lea edx, [ebp - 4]
push edx
mov eax, dword [ebp - 0x84]
mov ecx, dword [eax + 0x54]
push ecx
mov edx, dword [ebp - 0x84]
mov eax, dword [edx + 0x50]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.3001c7b5
mov dword [ebp - 0x90], eax
cmp dword [ebp - 0x90], 0
jne 0x3001d458
xor eax, eax
jmp 0x3001d60d
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x84]
mov ecx, dword [eax + 0x270]
and ecx, 4
test ecx, ecx
je 0x3001d4be
mov edx, dword [ebp - 0x84]
cmp dword [edx + 0x58], 0
je 0x3001d4be
mov eax, dword [ebp - 0x84]
cmp dword [eax + 0x5c], 0
je 0x3001d4be
lea ecx, [ebp - 8]
push ecx
mov edx, dword [ebp - 0x84]
mov eax, dword [edx + 0x5c]
push eax
mov ecx, dword [ebp - 0x84]
mov edx, dword [ecx + 0x58]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.3001c7b5
mov dword [ebp - 0x90], eax
cmp dword [ebp - 0x90], 0
jne 0x3001d4c5
xor eax, eax
jmp 0x3001d60d
mov dword [ebp - 8], 0
mov edx, dword [ebp - 0x84]
mov eax, dword [edx + 0x270]
and eax, 2
test eax, eax
je 0x3001d54c
mov ecx, dword [ebp - 0x84]
mov edx, dword [ecx + 0x274]
mov dword [ebp - 0x98], edx
mov eax, dword [ebp - 0x84]
add eax, 0x274
cmp dword [ebp - 0x98], eax
je 0x3001d54c
mov ecx, dword [ebp - 0x98]
sub ecx, 0xc
mov dword [ebp - 0x94], ecx
mov edx, dword [ebp - 0x98]
mov eax, dword [edx]
mov dword [ebp - 0x98], eax
push 0
push 2
push 0
mov ecx, dword [ebp - 0x94]
mov edx, dword [ecx + 8]
push edx
mov eax, dword [ebp - 0x94]
mov ecx, dword [eax]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.3001ca7d
mov dword [ebp - 0x90], eax
jmp 0x3001d4ea
mov edx, dword [ebp - 0x84]
mov eax, dword [edx + 8]
mov dword [ebp - 0x78], eax
mov ecx, dword [edx + 0xc]
mov dword [ebp - 0x74], ecx
mov edx, dword [ebp - 0x84]
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x70], eax
mov ecx, dword [ebp - 0x84]
mov edx, dword [ecx + 0x14]
mov dword [ebp - 0x6c], edx
mov eax, dword [ebp - 0x84]
mov ecx, dword [eax + 0x18]
mov dword [ebp - 0x68], ecx
mov esi, dword [ebp - 0x84]
add esi, 0x1c
mov ecx, 0xd
lea edi, [ebp - 0x60]
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebp - 4]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x84]
mov ecx, dword [eax + 0x54]
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 8]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x84]
mov ecx, dword [eax + 0x5c]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x88]
mov dword [ebp - 0x64], edx
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
push 0
lea eax, [ebp - 0x78]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.3001cd5c
mov dword [ebp - 0x90], eax
cmp dword [ebp - 0x90], 0
jne 0x3001d37a
xor eax, eax
jmp 0x3001d60d
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc