Function at 0x401120
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x20], 0xffffffff
test esi, esi
je 0x401390
lea eax, [ebp - 0x20]
mov dword [esp + 0x18], 2
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], eax
mov dword [esp], 0xffffffff
call dword [sym.imp.kernel32.dll_DuplicateHandle]
mov ebx, dword [0x42e0c4]
sub esp, 0x1c
mov dword [esp + 4], 0x40
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_LocalAlloc]
mov edx, eax
mov ecx, eax
mov dword [0x42e0c4], eax
mov eax, dword [ebp - 0x20]
sub esp, 8
mov dword [edx + 4], eax
mov eax, dword [ebp + 8]
test eax, eax
je 0x401480
mov eax, dword [ebp + 8]
cmp word [eax], 0
je 0x4014c0
nop
add eax, 2
cmp word [eax], 0
jne 0x4011c0
sub eax, dword [ebp + 8]
sar eax, 1
lea edx, [eax + eax + 2]
mov dword [esp], edx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], edx
call dbg.heap_xalloc
mov edx, dword [ebp - 0x2c]
mov edi, eax
mov eax, dword [ebp + 8]
mov dword [esp + 8], edx
mov dword [esp], edi
mov dword [esp + 4], eax
call sym._memcpy
mov ecx, dword [ebp - 0x30]
mov eax, dword [0x42e0c4]
mov dword [ecx + 8], edi
mov ecx, dword [ebp + 0xc]
mov dword [eax], ecx
mov edx, dword [0x42e0c4]
xor eax, eax
lea edi, [edx + 0x10]
lea ecx, [edx + 0xc]
mov dword [edx + 0xc], 0
and edi, 0xfffffffc
mov dword [edx + 0x30], 0
sub ecx, edi
add ecx, 0x28
shr ecx, 2
rep stosd dword es:[edi], eax
mov dword [edx + 0x34], ebx
mov dword [edx + 0x38], 0
test esi, esi
je 0x401381
xor eax, eax
movzx edx, word [esi + eax]
add eax, 2
mov word [eax + 0x4331de], dx
test dx, dx
jne 0x401245
mov dword [esp], 0
call dbg.WCMD_goto
mov eax, dword [0x42e0c4]
mov edx, dword [ebp - 0x20]
mov eax, dword [eax + 0x38]
test eax, eax
jne 0x4012d4
lea esi, [ebp - 0x1c]
jmp 0x4012b5
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dbg.WCMD_process_commands
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dbg.WCMD_free_commands
mov eax, dword [0x42e0c4]
mov eax, dword [eax + 0x38]
test eax, eax
jne 0x4012d4
mov edx, dword [ebp - 0x20]
mov dword [esp + 8], edx
mov dword [esp + 4], esi
mov dword [esp], 0
mov dword [ebp - 0x1c], 0
call dbg.WCMD_ReadAndParseLine
test eax, eax
jne 0x401280
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [0x42f1c0]
mov edx, dword [0x42e0c4]
sub esp, 4
test eax, eax
je 0x40131c
mov eax, dword [eax + 0xc]
cmp dword [edx + 4], eax
je 0x401308
jmp 0x40131c
mov edi, dword [edx + 4]
cmp dword [eax + 0xc], edi
jne 0x40131c
call dbg.WCMD_endlocal
mov eax, dword [0x42f1c0]
mov edx, dword [0x42e0c4]
test eax, eax
jne 0x401300
mov edx, dword [edx + 8]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [0x42e0c4]
sub esp, 0xc
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_LocalFree]
sub esp, 4
test ebx, ebx
je 0x401373
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x401373
test byte [section..data], 8
jne 0x401452
mov dword [ebx + 0x38], 1
mov dword [0x42e0c4], ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebp - 0x20]
jmp 0x401273
mov eax, dword [ebp + 8]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 7
mov dword [esp + 4], 0x80000000
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
mov dword [ebp - 0x20], eax
cmp eax, 0xffffffff
je 0x4014ca
mov ebx, dword [0x42e0c4]
mov dword [esp + 4], 0x40
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_LocalAlloc]
mov edx, dword [ebp - 0x20]
mov edi, dword [ebp + 8]
sub esp, 8
mov ecx, eax
mov dword [0x42e0c4], eax
mov dword [eax + 4], edx
test edi, edi
jne 0x4011b1
mov esi, eax
mov dword [eax + 8], 0
mov eax, dword [ebp + 0xc]
lea edi, [esi + 0x10]
mov dword [esi + 0xc], 0
mov dword [esi], eax
and edi, 0xfffffffc
lea eax, [esi + 0xc]
sub eax, edi
mov dword [esi + 0x30], 0
lea ecx, [eax + 0x28]
mov eax, dword [ebp + 8]
shr ecx, 2
rep stosd dword es:[edi], eax
mov dword [esi + 0x34], ebx
mov dword [esi + 0x38], 0
jmp 0x401273
mov dword [esp + 0xc], str.Batch_completed__but_was_not_called_so_skipping_outer_batch_too_n
mov dword [esp + 8], str.WCMD_batch
mov dword [esp + 4], 0x425000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.1
jmp 0x40136c
mov eax, dword [ebp + 0xc]
lea edi, [edx + 0x10]
mov dword [edx + 0xc], 0
and edi, 0xfffffffc
mov dword [edx + 0x30], 0
mov dword [edx], eax
lea eax, [edx + 0xc]
sub eax, edi
mov dword [edx + 8], 0
lea ecx, [eax + 0x28]
mov eax, dword [ebp + 8]
shr ecx, 2
rep stosd dword es:[edi], eax
mov dword [edx + 0x34], ebx
mov dword [edx + 0x38], 0
jmp 0x401243
mov edx, 2
jmp 0x4011d2
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 2
call dbg.WCMD_print_error
jmp 0x401379