Function at 0x47cf40
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push ebp
mov eax, dword fs:[0x18]
mov ebp, esp
push edi
push esi
push ebx
lea ebx, [ebp - 0x1c]
sub esp, 0x44
mov dword [eax + 0x34], 0xdeadbeef
xor eax, eax
lea esi, [esi]
nop
movzx edx, word [eax + 0x59f3f4]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x47cf60
mov eax, dword [sym.imp.kernel32.dll_FormatMessageW]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x59f402
mov dword [esp], 0x400
mov dword [ebp - 0x2c], eax
call eax
sub esp, 0x1c
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x59f177
mov dword [eax + 4], 0x465
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.Expected_FormatMessageA_to_return_0__got__lu_n
mov esi, dword fs:[0x18]
call fcn.0047c620
call fcn.0057d110
mov dword [eax], 0x59f177
mov dword [eax + 4], 0x466
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.Expected_GetLastError___to_return_ERROR_INSUFFICIENT_BUFFER__got__lu_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [esi + 0x34], 0x7a
sete al
mov dword [esp], eax
call fcn.0047c620
call fcn.0057d110
mov dword [eax], 0x59f177
mov dword [eax + 4], 0x469
mov eax, dword [sym.imp.kernel32.dll_lstrcmpW]
mov dword [esp + 4], 0x59f3f4
mov dword [esp], ebx
mov dword [ebp - 0x28], eax
call eax
sub esp, 8
test eax, eax
sete al
mov dword [esp + 4], str.Expected_the_buffer_to_be_untouched_n
movzx eax, al
mov dword [esp], eax
call fcn.0047c620
mov dword [esi + 0x34], 0xdeadbeef
xor eax, eax
lea esi, [esi]
lea esi, [esi]
movzx edx, word [eax + 0x59f3f4]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x47d070
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x59f402
mov dword [esp], 0x400
mov eax, dword [ebp - 0x2c]
call eax
sub esp, 0x1c
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x59f177
mov dword [eax + 4], 0x46f
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.Expected_FormatMessageA_to_return_0__got__lu_n
call fcn.0047c620
call fcn.0057d110
mov dword [eax], 0x59f177
mov dword [eax + 4], 0x470
mov eax, dword fs:[0x18]
mov edx, dword [eax + 0x34]
mov dword [esp + 4], str.Expected_GetLastError___to_return_ERROR_INSUFFICIENT_BUFFER__got__lu_n
mov dword [esp + 8], edx
cmp dword [eax + 0x34], 0x7a
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0047c620
call fcn.0057d110
mov dword [eax], 0x59f177
mov dword [eax + 4], 0x473
cmp dword [ebp - 0x1c], 0x780000
je 0x47d639
mov dword [esp + 4], 0x59f3f4
mov dword [esp], ebx
mov eax, dword [ebp - 0x28]
call eax
sub esp, 8
or eax, dword [0x8f0770]
sete al
movzx eax, al
mov dword [esp], eax
mov dword [esp + 4], str.Expected_the_buffer_to_be_truncated_n
call fcn.0047c620
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0xdeadbeef
xor eax, eax
lea esi, [esi]
nop
movzx edx, word [eax + 0x59f3f4]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x47d188
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 4
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x59f402
mov dword [esp], 0x400
mov eax, dword [ebp - 0x2c]
call eax
sub esp, 0x1c
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x59f177
mov dword [eax + 4], 0x47a
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.Expected_FormatMessageA_to_return_0__got__lu_n
call fcn.0047c620
call fcn.0057d110
mov dword [eax], 0x59f177
mov dword [eax + 4], 0x47b
mov eax, dword fs:[0x18]
mov edx, dword [eax + 0x34]
mov dword [esp + 4], str.Expected_GetLastError___to_return_ERROR_INSUFFICIENT_BUFFER__got__lu_n
mov dword [esp + 8], edx
cmp dword [eax + 0x34], 0x7a
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0047c620
call fcn.0057d110
mov dword [eax], 0x59f177
mov dword [eax + 4], 0x47e
cmp dword [ebp - 0x1c], 0x650074
je 0x47d65d
mov dword [esp + 4], 0x59f3f4
mov dword [esp], ebx
mov eax, dword [ebp - 0x28]
call eax
sub esp, 8
or eax, dword [0x8f0770]
sete al
movzx eax, al
mov dword [esp], eax
mov esi, 0x3e8
mov dword [esp + 4], str.Expected_the_buffer_to_be_truncated_n
mov edi, esi
call fcn.0047c620
mov eax, dword fs:[0x18]
mov dword [ebp - 0x30], eax
lea esi, [esi]
lea esi, [edi + edi]
mov dword [ebp - 0x24], esi
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x30]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov ebx, eax
mov dword [esp + 8], esi
mov esi, 0x4ec4ec4f
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x30]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
xor ecx, ecx
mov dword [ebp - 0x20], eax
sub esp, 0xc
mov dword [ebp - 0x34], eax
lea esi, [esi]
nop
mov eax, ecx
mul esi
mov eax, ecx
shr edx, 3
imul edx, edx, 0x1a
sub eax, edx
add eax, 0x41
mov word [ebx + ecx*2], ax
add ecx, 1
cmp ecx, edi
jne 0x47d300
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 0x34]
xor ecx, ecx
mov word [ebx + eax - 2], cx
mov dword [esp + 0x10], edx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], edi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 0x400
mov eax, dword [ebp - 0x2c]
call eax
sub esp, 0x1c
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x59f177
mov dword [eax + 4], 0x489
lea eax, [edi - 1]
mov dword [ebp - 0x24], eax
cmp eax, esi
je 0x47d5d0
mov eax, dword [0x8f0770]
test eax, eax
jne 0x47d5f0
test esi, esi
je 0x47d618
mov dword [esp + 8], esi
mov dword [esp + 4], 0x59f4a4
mov dword [esp], 0
call fcn.0047c620
call fcn.0057d110
mov dword [eax], 0x59f177
mov dword [eax + 4], 0x48b
mov eax, dword [ebp - 0x20]
mov dword [esp], ebx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
call eax
sub esp, 8
test eax, eax
sete al
mov dword [esp + 4], str.wrong_buffer_n
movzx eax, al
mov dword [esp], eax
call fcn.0047c620
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ebx
mov eax, dword [ebp - 0x20]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x59f4bc
mov dword [esp], 0x400
call fcn.0047bbe0
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x59f177
mov dword [eax + 4], 0x48d
xor eax, eax
mov dword [esp + 8], esi
mov dword [esp + 4], 0x59f4a4
cmp dword [ebp - 0x24], esi
sete al
mov dword [esp], eax
call fcn.0047c620
call fcn.0057d110
mov dword [eax], 0x59f177
mov dword [eax + 4], 0x48e
mov eax, dword [ebp - 0x20]
mov dword [esp], ebx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
call eax
sub esp, 8
test eax, eax
sete al
mov dword [esp + 4], str.wrong_buffer_n
movzx eax, al
mov dword [esp], eax
mov esi, dword fs:[0x18]
call fcn.0047c620
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
lea eax, [ebp - 0x20]
sub esp, 0xc
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 0x500
mov edx, dword [ebp - 0x2c]
call edx
sub esp, 0x1c
mov dword [ebp - 0x34], eax
call fcn.0057d110
mov edx, dword [ebp - 0x34]
mov dword [eax], 0x59f177
mov dword [eax + 4], 0x492
xor eax, eax
mov dword [esp + 8], edx
mov dword [esp + 4], 0x59f4a4
cmp dword [ebp - 0x24], edx
sete al
mov dword [esp], eax
call fcn.0047c620
call fcn.0057d110
mov dword [eax], 0x59f177
mov dword [eax + 4], 0x493
mov eax, dword [ebp - 0x20]
mov dword [esp], ebx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
call eax
sub esp, 8
test eax, eax
sete al
mov dword [esp + 4], str.wrong_buffer_n
movzx eax, al
mov dword [esp], eax
call fcn.0047c620
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [ebp - 0x20]
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, 0xcccccccd
mul edi
sub esp, 0xc
shr edx, 3
add edi, edx
cmp edi, 0xf423f
jbe 0x47d2a0
mov dword [esp + 8], str.unused
mov dword [esp + 4], str.eaten
mov dword [esp], str._1_s___2_s_
call fcn.0047ca90
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], 0x59f4a4
mov dword [esp], 1
mov dword [esp + 8], eax
call fcn.0047c620
jmp 0x47d3ab
mov dword [esp + 8], esi
mov dword [esp + 4], 0x59f4a4
mov dword [esp], 0
call fcn.0047c620
test esi, esi
jne 0x47d3ab
jmp 0x47d5ab
mov dword [esp + 8], 0
mov dword [esp + 4], 0x59f4a4
mov dword [esp], 1
call fcn.0047c620
jmp 0x47d5ab
cmp dword [ebp - 0x18], 0x780078
jne 0x47d145
cmp dword [ebp - 0x14], 0x780078
mov eax, 1
jne 0x47d145
jmp 0x47d164
cmp dword [ebp - 0x18], 0x73
jne 0x47d25d
cmp dword [ebp - 0x14], 0x780078
mov eax, 1
jne 0x47d25d
jmp 0x47d27c