Function at 0x402ad0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x3c
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], ecx
mov dword [esp + 4], 0xa4
mov dword [esp], 1
call dword [sym.imp.ucrtbase.dll_calloc]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
test eax, eax
je 0x402c52
mov edi, dword [0x413088]
mov dword [eax], 0x413080
mov ebx, eax
mov dword [eax + 4], esi
mov dword [eax + 8], 3
mov dword [eax + 0x14], 0x19
mov dword [eax + 0x18], 1
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], ecx
test edi, edi
je 0x402d90
mov eax, dword [edi + 0x28]
mov dword [ebx + 0x28], eax
mov eax, dword [edi + 0x2c]
mov dword [ebx + 0x2c], eax
mov eax, dword [edi + 0x7c]
sub eax, dword [edi + 0x74]
mov dword [ebx + 0x7c], eax
mov eax, dword [edi + 0x80]
sub eax, dword [edi + 0x78]
mov dword [ebx + 0x80], eax
movzx eax, word [edi + 0x24]
mov word [ebx + 0x24], ax
mov word [ebx + 0x26], ax
mov eax, dword [edi + 0x84]
mov dword [ebx + 0x84], eax
mov eax, dword [edi + 0x88]
mov dword [ebx + 0x88], eax
mov eax, dword [edi + 0x8c]
mov dword [ebx + 0x8c], eax
mov eax, dword [edi + 0x90]
mov dword [ebx + 0x90], eax
mov ecx, dword [edi + 0x34]
mov dword [ebx + 0x34], ecx
mov ecx, dword [edi + 0x38]
mov dword [ebx + 0x38], ecx
mov ecx, dword [edi + 0x3c]
mov dword [ebx + 0x3c], ecx
mov ecx, dword [edi + 0x40]
mov dword [ebx + 0x40], ecx
mov ecx, dword [edi + 0x44]
mov dword [ebx + 0x44], ecx
mov ecx, dword [edi + 0x48]
mov dword [ebx + 0x48], ecx
mov ecx, dword [edi + 0x4c]
mov eax, dword [ebx + 0x90]
mov dword [ebx + 0x4c], ecx
mov ecx, dword [edi + 0x50]
mov dword [ebx + 0x50], ecx
mov ecx, dword [edi + 0x54]
mov dword [ebx + 0x54], ecx
mov ecx, dword [edi + 0x58]
mov dword [ebx + 0x58], ecx
mov ecx, dword [edi + 0x5c]
mov dword [ebx + 0x5c], ecx
mov ecx, dword [edi + 0x60]
mov dword [ebx + 0x60], ecx
mov ecx, dword [edi + 0x64]
mov dword [ebx + 0x64], ecx
mov ecx, dword [edi + 0x68]
mov dword [ebx + 0x68], ecx
mov ecx, dword [edi + 0x6c]
mov dword [ebx + 0x6c], ecx
mov edx, dword [edi + 0x70]
mov dword [ebx + 0x70], edx
test eax, eax
jne 0x402dc0
mov edi, dword [0x4142e4]
test edi, edi
jne 0x402c2b
jmp 0x402c5e
lea ecx, [edi + 4]
lea edx, [edi + 8]
mov eax, ecx
cmovns eax, edx
mov edx, dword [eax]
test edx, edx
je 0x402c68
mov edi, edx
mov dword [esp + 4], edi
mov dword [esp], esi
call dword [0x4142e0]
test eax, eax
jne 0x402c18
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_free]
test byte [0x413024], 2
jne 0x402e00
xor ebx, ebx
add esp, 0x3c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0x4142e4
lea esi, [esi]
nop
lea edx, [ebx + 0x94]
mov dword [ebx + 0x94], edi
mov dword [ebx + 0xa0], 1
mov dword [ebx + 0x98], 0
mov dword [ebx + 0x9c], 0
mov dword [eax], edx
mov eax, dword [ebx + 0x94]
mov dword [ebp - 0x1c], edx
test eax, eax
je 0x402cab
test byte [eax + 0xc], 1
jne 0x402d40
mov eax, dword [0x4142e4]
and dword [eax + 0xc], 0xfffffffe
mov esi, dword [ebx + 0xc]
mov edi, dword [ebx + 0x10]
mov eax, esi
imul eax, edi
shl eax, 2
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebx + 0x30], eax
mov ecx, eax
test eax, eax
je 0x402f4a
xor eax, eax
test esi, esi
jne 0x402ce3
jmp 0x402cf3
mov ecx, dword [ebx + 0x30]
mov dword [ecx + eax*4], 0x70020
inc eax
cmp eax, dword [ebx + 0xc]
jb 0x402ce0
mov edi, dword [ebx + 0x10]
cmp edi, 1
jbe 0x402c54
mov esi, 1
lea esi, [esi]
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebx + 0x30]
shl eax, 2
mov dword [esp + 4], ecx
mov edx, eax
mov dword [esp + 8], eax
imul edx, esi
inc esi
add edx, ecx
mov dword [esp], edx
call sym._memcpy
cmp esi, dword [ebx + 0x10]
jb 0x402d08
add esp, 0x3c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [eax]
mov ecx, dword [edi + 4]
cmp ecx, eax
je 0x402e2f
test ecx, ecx
je 0x402ea8
test byte [ecx + 0xc], 1
je 0x402ea8
xor dword [edi + 0xc], 1
xor dword [ecx + 0xc], 1
mov eax, dword [edi + 8]
xor dword [eax + 0xc], 1
mov eax, dword [edx]
mov edx, dword [eax]
mov eax, dword [edx]
test eax, eax
je 0x402cab
test byte [eax + 0xc], 1
jne 0x402d40
jmp 0x402cab
mov dword [eax + 0x28], edx
dec edx
mov dword [eax + 0x2c], ecx
dec ecx
mov dword [eax + 0x7c], edx
mov dword [eax + 0x80], ecx
mov dword [eax + 0x24], 0xf50007
mov dword [eax + 0x88], 0x10190
jmp 0x402c06
lea edx, [eax + eax]
mov dword [esp], edx
mov dword [ebp - 0x1c], edx
call dword [sym.imp.ucrtbase.dll_malloc]
mov edx, dword [ebp - 0x1c]
test eax, eax
mov dword [ebx + 0x8c], eax
je 0x402f7e
mov ecx, dword [edi + 0x8c]
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 4], ecx
call sym._memcpy
jmp 0x402c06
mov dword [esp + 0x10], esi
xor ebx, ebx
mov dword [esp + 0xc], str.id__x_already_exists_n
mov dword [esp + 8], str.create_screen_buffer
mov dword [esp + 4], 0x413024
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x402c54
mov ecx, dword [edi + 8]
test ecx, ecx
je 0x402e54
test byte [ecx + 0xc], 1
je 0x402e54
xor dword [edi + 0xc], 1
xor dword [eax + 0xc], 1
mov eax, dword [edi + 8]
xor dword [eax + 0xc], 1
mov eax, dword [edx]
mov edx, dword [eax]
jmp 0x402d72
mov ecx, dword [eax + 8]
cmp edx, ecx
je 0x402eec
mov ecx, dword [edx]
and dword [ecx + 0xc], 0xfffffffe
mov eax, dword [edx]
mov eax, dword [eax]
or dword [eax + 0xc], 1
mov eax, dword [edx]
mov eax, dword [eax]
mov edi, dword [eax]
mov ecx, dword [eax + 4]
test edi, edi
je 0x402f37
cmp eax, dword [edi + 4]
je 0x402f42
mov dword [edi + 8], ecx
mov edi, dword [ecx + 8]
mov dword [eax + 4], edi
test edi, edi
je 0x402e96
mov dword [edi], eax
mov dword [ecx + 8], eax
mov edi, dword [eax]
mov dword [ecx], edi
mov dword [eax], ecx
jmp 0x402d72
mov ecx, dword [eax + 4]
cmp edx, ecx
je 0x402f18
mov ecx, dword [edx]
and dword [ecx + 0xc], 0xfffffffe
mov eax, dword [edx]
mov eax, dword [eax]
or dword [eax + 0xc], 1
mov eax, dword [edx]
mov eax, dword [eax]
mov edi, dword [eax]
mov ecx, dword [eax + 8]
test edi, edi
je 0x402f0b
cmp eax, dword [edi + 4]
je 0x402f13
mov dword [edi + 8], ecx
mov edi, dword [ecx + 4]
mov dword [eax + 8], edi
test edi, edi
je 0x402ede
mov dword [edi], eax
mov dword [ecx + 4], eax
mov edi, dword [eax]
mov dword [ecx], edi
mov dword [eax], ecx
jmp 0x402d72
mov dword [edi + 4], ecx
mov edx, dword [ecx + 4]
mov dword [eax + 8], edx
test edx, edx
je 0x402efb
mov dword [edx], eax
mov dword [ecx + 4], eax
mov edx, dword [eax]
mov dword [ecx], edx
mov edx, eax
mov dword [eax], ecx
jmp 0x402e61
mov dword [0x4142e4], ecx
jmp 0x402ed2
mov dword [edi + 4], ecx
jmp 0x402ed2
mov dword [edi + 8], ecx
mov edx, dword [ecx + 8]
mov dword [eax + 4], edx
test edx, edx
je 0x402f27
mov dword [edx], eax
mov dword [ecx + 8], eax
mov edx, dword [eax]
mov dword [ecx], edx
mov edx, eax
mov dword [eax], ecx
jmp 0x402eb1
mov dword [0x4142e4], ecx
jmp 0x402e8a
mov dword [edi + 4], ecx
jmp 0x402e8a
mov eax, dword [ebx]
cmp ebx, dword [eax + 8]
je 0x402f8e
mov eax, dword [ebp - 0x1c]
call sym._rb_remove.constprop.0
mov eax, dword [ebx + 0x8c]
mov esi, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], eax
call esi
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
call esi
mov dword [esp], ebx
xor ebx, ebx
call esi
jmp 0x402c54
mov dword [esp], ebx
xor ebx, ebx
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x402c54
mov dword [eax + 8], 0
jmp 0x402f51