Function at 0x41db40
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov esi, dword fs:[0x18]
sub esp, 0x38
mov eax, dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0x58b2d8
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [ebp - 0x10], eax
call eax
sub esp, 0x20
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x58a4b3
mov dword [eax + 4], 0x2b
mov eax, dword [esi + 0x34]
mov dword [esp + 8], edi
mov dword [esp + 0xc], eax
xor eax, eax
test edi, edi
setg al
mov dword [esp + 4], str.returned__d_with__lu__expected___0__n
mov dword [esp], eax
call fcn.0041ae70
lea edx, [edi + edi]
mov dword [esp + 8], edx
mov dword [ebp - 0x14], edx
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_HeapAlloc]
sub esp, 0xc
test eax, eax
je 0x41e146
mov edx, dword [ebp - 0x14]
mov ebx, eax
lea ecx, [edx - 1]
mov edx, dword [sym.imp.msvcrt.dll_memset]
mov dword [ebp - 0x14], ecx
mov dword [esp + 8], ecx
mov dword [esp + 4], 0x78
mov dword [esp], eax
mov dword [ebp - 0x1c], edx
call edx
mov ecx, dword [ebp - 0x14]
lea eax, [edi + 1]
add ecx, ebx
mov byte [ecx], 0
mov dword [ebp - 0x18], ecx
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0x58b2d8
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, dword [ebp - 0x10]
call eax
sub esp, 0x20
mov dword [ebp - 0x20], eax
call fcn.0057d110
mov dword [eax], 0x58a4b3
mov dword [eax + 4], 0x37
mov dword [esp + 0x10], ebx
mov eax, dword [esi + 0x34]
mov dword [esp + 0xc], eax
mov edx, dword [ebp - 0x20]
xor eax, eax
mov dword [esp + 4], str.returned__d_with__lu_and__s__expected___0__n
test edx, edx
mov dword [esp + 8], edx
setg al
mov dword [esp], eax
call fcn.0041ae70
call fcn.0057d110
mov edx, dword [sym.imp.kernel32.dll_lstrcmpA]
mov dword [eax], 0x58a4b3
mov dword [eax + 4], 0x39
mov dword [esp + 4], 0x58a786
mov dword [esp], ebx
mov dword [ebp - 0x24], edx
call edx
sub esp, 8
test eax, eax
sete al
mov dword [esp + 8], ebx
movzx eax, al
mov dword [esp + 4], str.expected__foobar__got___s__n
mov dword [esp], eax
call fcn.0041ae70
mov ecx, dword [ebp - 0x14]
mov dword [esp + 4], 0x78
mov dword [esp], ebx
mov dword [esp + 8], ecx
mov edx, dword [ebp - 0x1c]
call edx
mov ecx, dword [ebp - 0x18]
mov byte [ecx], 0
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0x58b2d8
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, dword [ebp - 0x10]
call eax
sub esp, 0x20
mov dword [ebp - 0x20], eax
call fcn.0057d110
mov dword [eax], 0x58a4b3
mov dword [eax + 4], 0x3f
mov dword [esp + 0x10], ebx
mov eax, dword [esi + 0x34]
mov dword [esp + 0xc], eax
mov ecx, dword [ebp - 0x20]
xor eax, eax
mov dword [esp + 4], str.returned__d_with__lu_and__s__expected___0__n
test ecx, ecx
mov dword [esp + 8], ecx
setg al
mov dword [esp], eax
call fcn.0041ae70
call fcn.0057d110
mov dword [eax], 0x58a4b3
mov dword [eax + 4], 0x41
mov dword [esp + 4], 0x58a786
mov dword [esp], ebx
mov edx, dword [ebp - 0x24]
call edx
sub esp, 8
test eax, eax
sete al
mov dword [esp + 8], ebx
movzx eax, al
mov dword [esp + 4], str.expected__foobar__got___s__n
mov dword [esp], eax
call fcn.0041ae70
mov ecx, dword [ebp - 0x14]
mov dword [esp + 4], 0x78
mov dword [esp], ebx
mov dword [esp + 8], ecx
mov edx, dword [ebp - 0x1c]
call edx
mov ecx, dword [ebp - 0x18]
lea eax, [edi - 1]
mov byte [ecx], 0
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0x58b2d8
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, dword [ebp - 0x10]
call eax
sub esp, 0x20
mov dword [ebp - 0x20], eax
call fcn.0057d110
mov edx, dword [ebp - 0x20]
mov dword [eax], 0x58a4b3
mov dword [eax + 4], 0x47
xor eax, eax
mov ecx, dword [esi + 0x34]
test edx, edx
jne 0x41de74
xor eax, eax
cmp ecx, 0x7a
sete al
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 4], str.returned__d_with__lu_and__s__expected_0_with_ERROR_INSUFFICIENT_BUFFER__n
call fcn.0041ae70
call fcn.0057d110
mov dword [eax], 0x58a4b3
mov dword [eax + 4], 0x4a
mov dword [esp + 8], 6
mov dword [esp + 4], 0x58a786
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_strncmp]
mov dword [esp + 8], ebx
test eax, eax
mov dword [esp + 4], str.expected__foobar__got___s__n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0041ae70
call fcn.0057d110
mov dword [eax], 0x58a4b3
mov dword [eax + 4], 0x4b
xor eax, eax
mov dword [esp + 8], ebx
mov dword [esp + 4], str.expected_buf_5_x__got___s__n
cmp byte [ebx + 6], 0x78
sete al
mov dword [esp], eax
call fcn.0041ae70
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], 0x78
mov dword [esp], ebx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x1c]
call eax
mov eax, dword [ebp - 0x18]
mov edx, dword fs:[0x18]
mov byte [eax], 0
mov dword [ebp - 0x14], edx
mov dword [edx + 0x34], 0xdeadbeef
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0x58b2d8
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, dword [ebp - 0x10]
call eax
sub esp, 0x20
mov esi, eax
call fcn.0057d110
mov edx, dword [ebp - 0x14]
mov dword [eax], 0x58a4b3
mov dword [eax + 4], 0x51
xor eax, eax
mov ecx, dword [edx + 0x34]
test esi, esi
jne 0x41df9f
xor eax, eax
cmp ecx, 0x7a
sete al
mov dword [esp + 0xc], ecx
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 4], str.returned__d_with__lu_and__s__expected_0_with_ERROR_INSUFFICIENT_BUFFER__n
call fcn.0041ae70
call fcn.0057d110
mov dword [eax], 0x58a4b3
mov dword [eax + 4], 0x54
xor eax, eax
mov dword [esp + 8], ebx
mov dword [esp + 4], str.expected_buf_1_f__got___s__n
cmp byte [ebx], 0x66
sete al
mov dword [esp], eax
call fcn.0041ae70
call fcn.0057d110
mov dword [eax], 0x58a4b3
mov dword [eax + 4], 0x55
xor eax, eax
mov dword [esp + 8], ebx
mov dword [esp + 4], str.expected_buf_1_x__got___s__n
cmp byte [ebx + 1], 0x78
sete al
mov dword [esp], eax
mov esi, dword fs:[0x18]
call fcn.0041ae70
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0x58b2d8
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, dword [ebp - 0x10]
call eax
sub esp, 0x20
mov dword [ebp - 0x14], eax
call fcn.0057d110
mov dword [eax], 0x58a4b3
mov dword [eax + 4], 0x59
mov eax, dword [esi + 0x34]
mov dword [esp + 0xc], eax
mov edx, dword [ebp - 0x14]
xor eax, eax
mov dword [esp + 4], str.returned__d_with__lu__expected___0__n
test edx, edx
mov dword [esp + 8], edx
setg al
mov dword [esp], eax
call fcn.0041ae70
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 0x14], edi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0x58b2d8
mov dword [esp + 4], 0
mov dword [esp], 0
mov eax, dword [ebp - 0x10]
call eax
sub esp, 0x20
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x58a4b3
mov dword [eax + 4], 0x5e
xor eax, eax
mov edx, dword [esi + 0x34]
test edi, edi
je 0x41e150
mov dword [esp], eax
mov dword [esp + 0xc], edx
mov dword [esp + 8], edi
mov dword [esp + 4], str.returned__d_with__lu__expected_0_with_ERROR_INVALID_PARAMETER__n
call fcn.0041ae70
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
cmp edx, 0x57
sete al
jmp 0x41e10a