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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xb0
mov edi, edx
mov esi, ecx
push 0x58
push 1
call sub.MSVCR70.dll_calloc
add esp, 8
test eax, eax
je 0x41476d
mov dword [esp + 8], eax
mov dword [esp + 0x10], esi
push 0x10
push 1
call sub.MSVCR70.dll_calloc
add esp, 8
test eax, eax
je 0x41476d
mov ebx, eax
mov dword [esp + 4], edi
mov edi, dword [esp + 0x10]
mov dword [eax], edi
push 0x9c
push 1
call sub.MSVCR70.dll_calloc
add esp, 8
test eax, eax
je 0x41476d
mov esi, eax
mov dword [eax + 4], eax
mov dword [eax + 8], 0x43a74a
movsd xmm0, qword [0x438240]
movsd qword [eax + 0xc], xmm0
mov dword [eax + 0x14], 0x10001
mov dword [eax + 0x1c], 0x415010
mov dword [eax + 0x20], 0x415020
mov dword [eax + 0x24], 0x415180
mov dword [eax + 0x3c], 0x415200
mov ecx, dword [edi + 0x58]
mov edx, dword [edi + 0x60]
push eax
call fcn.00415490
add esp, 4
mov dword [ebx + 4], esi
push 0xb8
push 1
call sub.MSVCR70.dll_calloc
add esp, 8
test eax, eax
je 0x41476d
mov esi, eax
mov dword [eax + 0x80], 0
mov dword [eax + 0x84], 0
add eax, 0x40
mov dword [esi + 0x44], esi
mov dword [esi + 0x48], 0x43a80f
movsd xmm0, qword [0x438250]
movsd qword [esi + 0x4c], xmm0
mov dword [esi + 0x54], 0x10001
mov dword [esi + 0x5c], 0x415210
mov dword [esi + 0x60], 0x415280
mov dword [esi + 0x64], 0x415350
mov dword [esi + 0x7c], 0
mov dword [esi + 4], esi
mov dword [esi + 8], 0x43a859
movsd xmm0, qword [0x438260]
movsd qword [esi + 0xc], xmm0
mov dword [esi + 0x14], 0x10001
mov dword [esi + 0x1c], 0x415210
mov dword [esi + 0x20], 0x415360
mov dword [esi + 0x24], 0x415350
mov dword [esi + 0x3c], 0x415480
mov ecx, dword [edi + 0x58]
mov edx, dword [edi + 0x60]
push eax
call fcn.00415490
add esp, 4
mov ecx, dword [edi + 0x58]
mov edx, dword [edi + 0x60]
push esi
call fcn.00415490
add esp, 4
mov dword [ebx + 8], esi
mov ecx, 1
xor eax, eax
lock cmpxchg dword [esi + 0x80], ecx
jne 0x4146b8
mov dword [esi + 0x84], str.hid_mouse.c_280
mov edi, dword [esp + 4]
mov dword [esi + 0x88], edi
mov ecx, dword [ebp + 8]
mov dword [esi + 0x8c], ecx
xor edx, edx
xchg dword [esi + 0x80], edx
cmp edx, 1
jne 0x4146cd
mov eax, dword [esp + 8]
mov dword [eax + 4], ebx
mov dword [eax + 0xc], edi
mov dword [eax + 0x10], ecx
mov byte [eax + 0x18], 4
mov dword [eax + 0x34], 0x414780
mov dword [eax + 0x38], 0x4148e0
mov dword [eax + 0x3c], 0x414970
mov dword [eax + 0x40], 0x414a20
mov dword [eax + 0x44], 0x414a70
mov dword [eax + 0x48], 0x414b10
mov dword [eax + 0x4c], 0x414ba0
mov dword [eax + 0x50], 0x414cc0
mov dword [eax + 0x54], 0x414d90
mov eax, dword [0x440164]
test eax, eax
jle 0x413f9f
mov edi, dword [0x440168]
mov esi, dword [edi]
test esi, esi
je 0x413f9f
mov bl, 1
mov edx, 1
nop dword [eax + eax]
cmp byte [esi], 0x2d
jne 0x413f90
xor ecx, ecx
cmp byte [esi + 1], 0x2d
sete cl
cmp byte [esi + ecx + 1], 0x67
jne 0x413f90
inc ecx
cmp byte [esi + ecx + 1], 0x75
jne 0x413f90
cmp byte [esi + ecx + 2], 0x69
jne 0x413f90
movzx ecx, byte [esi + ecx + 3]
test ecx, ecx
je 0x4145a2
cmp ecx, 0x3d
je 0x4145a2
nop word [eax + eax]
cmp eax, edx
je 0x413f9f
setg bl
mov esi, dword [edi + edx*4]
inc edx
test esi, esi
jne 0x413f50
mov eax, dword [0x45635c]
cmp eax, 2
mov esi, dword [esp + 8]
jne 0x4146df
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
movsd xmm0, qword [esi + 0xc]
movsd qword [esp + 0x38], xmm0
lea eax, [esp + 0x30]
push 0
push 0
push 0xca0000
push eax
call dword [sym.imp.USER32.dll_AdjustWindowRectEx]
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x3c]
sub esi, dword [esp + 0x30]
sub edi, dword [esp + 0x34]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0
push eax
push 0
push 0
push edi
push esi
push 0x80000000
push 0x80000000
push 0x10ca0000
push str.RVVM
push str.RVVM_window
push 0
call dword [sym.imp.USER32.dll_CreateWindowExW]
test eax, eax
je 0x414107
mov esi, eax
push 8
push 1
call sub.MSVCR70.dll_calloc
add esp, 8
test eax, eax
je 0x41476d
mov ebx, eax
mov dword [eax], esi
push esi
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebx + 4], eax
mov edi, dword [esp + 8]
mov dword [edi], ebx
mov byte [edi + 0x18], 4
mov edx, dword [edi + 0x14]
test edx, edx
jne 0x414065
mov edx, dword [edi + 0xc]
shl edx, 2
imul edx, dword [edi + 0x10]
xor ecx, ecx
push 6
call fcn.00411790
add esp, 4
mov dword [edi + 8], eax
mov dword [edi + 0x1c], 0x42ccd0
mov dword [edi + 0x20], 0x42cd50
mov dword [edi + 0x24], 0x42cef0
xorps xmm0, xmm0
movaps xmmword [esp + 0x80], xmm0
movaps xmmword [esp + 0x90], xmm0
xorps xmm0, xmm0
movsd qword [esp + 0xa0], xmm0
mov dword [esp + 0x8c], edi
mov dword [esp + 0x98], 0x43a644
lea edx, [esp + 0x80]
mov ebx, dword [esp + 0x10]
mov ecx, ebx
call fcn.0040ee00
mov eax, dword [edi + 0x14]
mov dword [esp + 0x58], eax
test eax, eax
mov ecx, eax
jne 0x414194
mov eax, dword [edi + 0xc]
movzx ecx, byte [edi + 0x18]
mov edx, ecx
add ecx, 0xfffffffe
cmp ecx, 0x12
ja case.0x4140f6.5
jmp dword [ecx*4 + 0x43c39c]
mov edx, 4
jmp case.0x4140f6.2
push str.Failed_to_create_window_
call fcn.00410c50
add esp, 4
push str.No_suitable_windowing_backends_found_
call fcn.00410c50
add esp, 4
mov edi, dword [esp + 8]
mov esi, dword [edi + 4]
cmp byte [esi + 0xe], 0
je 0x414160
mov eax, dword [edi + 0x28]
test eax, eax
je 0x414160
mov byte [esi + 0xe], 0
push 0
push edi
call eax
add esp, 8
mov eax, dword [edi + 0x2c]
test eax, eax
je 0x414160
cmp byte [esi + 0xe], 0
mov ecx, 0x43a67c
mov edx, str.RVVM___Press_CtrlAltG_to_release_grab
cmove edx, ecx
push edx
push edi
call eax
add esp, 8
mov eax, dword [edi + 0x24]
test eax, eax
je 0x41416d
push edi
call eax
add esp, 4
push dword [edi + 4]
call sub.MSVCR70.dll_free
add esp, 4
push edi
call sub.MSVCR70.dll_free
add esp, 4
jmp 0x41459a
mov edx, 3
jmp case.0x4140f6.2
xor edx, edx
mov ecx, edx
imul ecx, eax
mov esi, dword [edi + 0x10]
imul ecx, esi
mov dword [esp + 0x1c], ecx
test ecx, ecx
je 0x4142f2
mov ecx, dword [ebx]
mov edi, dword [ebx + 4]
mov edx, ebx
mov ebx, dword [ebx + 8]
mov eax, ecx
add eax, ebx
mov eax, edi
adc eax, 0
mov dword [esp + 0x64], eax
mov dword [esp + 0x70], ecx
add ebx, ecx
mov eax, dword [edx + 0xc]
mov dword [esp + 0x6c], edi
adc eax, edi
mov dword [esp + 0x68], ebx
add ebx, 0xfff
adc eax, 0
mov dword [esp + 0x60], eax
and ebx, 0xfffff000
mov dword [esp + 0x5c], ebx
mov ecx, 0x28000000
xor edx, edx
mov dword [esp + 0x18], esi
mov edi, dword [esp + 0x1c]
jmp 0x414227
mov dword [esp + 4], 0
mov ebx, dword [esp + 0x5c]
mov eax, dword [esp + 0x60]
test byte [esp + 4], 1
mov ecx, ebx
mov edx, eax
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
jne 0x4142ff
mov eax, ecx
add eax, edi
mov ebx, edx
adc edx, 0
cmp dword [esp + 0x70], eax
mov eax, dword [esp + 0x6c]
sbb eax, edx
mov edx, ebx
jae 0x41424a
cmp ecx, dword [esp + 0x68]
mov eax, edx
sbb eax, dword [esp + 0x64]
jb 0x414200
mov eax, dword [esp + 0x10]
mov ebx, dword [eax + 0x2c]
test ebx, ebx
je 0x4142fb
mov esi, dword [eax + 0x24]
mov edi, edx
mov al, 1
mov dword [esp + 4], eax
mov dword [esp + 0x74], ebx
nop dword [eax + eax]
mov dword [esp + 0x14], esi
mov ebx, dword [esi]
mov eax, dword [ebx]
mov dword [esp + 0x78], eax
mov edx, dword [ebx + 4]
mov ebx, dword [ebx + 8]
add ebx, eax
mov eax, edx
adc eax, 0
cmp ecx, ebx
mov esi, ecx
mov dword [esp + 0x7c], ecx
mov ecx, edi
sbb edi, eax
setb byte [esp + 0xf]
mov edi, esi
add edi, dword [esp + 0x1c]
mov esi, ecx
adc esi, 0
cmp dword [esp + 0x78], edi
mov edi, 0
sbb edx, esi
setb dl
add ebx, 0xfff
adc eax, 0
and ebx, 0xfffff000
test byte [esp + 0xf], dl
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 4]
movzx edx, dl
cmovne edx, edi
mov dword [esp + 4], edx
cmove eax, ecx
cmove ebx, dword [esp + 0x7c]
add esi, 4
dec dword [esp + 0x74]
mov ecx, ebx
mov edi, eax
jne 0x414270
jmp 0x414210
mov ebx, 0x28000000
xor eax, eax
jmp 0x4142ff
mov ebx, ecx
mov eax, edx
mov edi, dword [esp + 0x58]
test edi, edi
mov dword [esp + 0x30], ebx
mov dword [esp + 4], eax
mov dword [esp + 0x34], eax
jne 0x414342
mov ecx, dword [esp + 8]
mov eax, dword [ecx + 0xc]
movzx ecx, byte [ecx + 0x18]
mov edi, ecx
add ecx, 0xfffffffe
cmp ecx, 0x12
ja case.0x414328.5
jmp dword [ecx*4 + 0x43c3e8]
mov edi, 4
jmp case.0x414328.2
mov edi, 3
jmp case.0x414328.2
xor edi, edi
imul edi, eax
imul esi, edi
mov dword [esp + 0x18], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], 0
mov eax, dword [esp + 8]
mov eax, dword [eax + 8]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0x440050
xorps xmm0, xmm0
movsd qword [esp + 0x4c], xmm0
mov word [esp + 0x54], 0
lea edx, [esp + 0x30]
mov ecx, dword [esp + 0x10]
call fcn.0040ee00
test eax, eax
je 0x41459a
mov ecx, str.framebuffer
mov edx, ebx
mov edi, dword [esp + 4]
push edi
call fcn.00402070
add esp, 4
mov esi, eax
bswap ebx
mov dword [esp + 0x24], ebx
mov ecx, edi
mov byte [esp + 0x23], cl
mov byte [esp + 0x22], ch
mov eax, edi
shr eax, 0x10
mov byte [esp + 0x21], al
shr ecx, 0x18
mov byte [esp + 0x20], cl
mov ecx, dword [esp + 0x18]
mov byte [esp + 0x2f], cl
mov byte [esp + 0x2e], ch
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x2d], al
shr ecx, 0x18
mov byte [esp + 0x2c], cl
mov dword [esp + 0x28], 0
lea eax, [esp + 0x20]
mov ecx, esi
mov edx, 0x43ac95
push 0x10
push eax
call fcn.00402500
add esp, 8
mov dword [esp + 4], esi
mov ecx, esi
mov edx, str.compatible
push 0x13
push str.simple_framebuffer
call fcn.00402500
add esp, 8
mov eax, dword [esp + 8]
movzx eax, byte [eax + 0x18]
add eax, 0xfffffffe
cmp eax, 0x12
ja case.0x414433.5
jmp dword [eax*4 + 0x43c434]
mov ebx, dword [esp + 4]
mov ecx, ebx
mov edx, str.format
push 7
push str.r5g6b5
jmp 0x414488
mov ebx, dword [esp + 4]
mov ecx, ebx
mov edx, str.format
push 9
push str.a8r8g8b8
jmp 0x414488
mov ebx, dword [esp + 4]
mov ecx, ebx
mov edx, str.format
push 7
push str.r8g8b8
jmp 0x414488
mov ebx, dword [esp + 4]
mov ecx, ebx
mov edx, str.format
push 9
push str.a8b8g8r8
call fcn.00402500
add esp, 8
mov edi, dword [esp + 8]
mov eax, dword [edi + 0xc]
bswap eax
mov dword [esp + 0x20], eax
mov ecx, ebx
mov edx, str.width
push 4
lea esi, [esp + 0x24]
push esi
call fcn.00402500
add esp, 8
mov eax, dword [edi + 0x10]
bswap eax
mov dword [esp + 0x20], eax
mov ecx, ebx
mov edx, str.height
push 4
push esi
call fcn.00402500
add esp, 8
mov eax, dword [edi + 0x14]
test eax, eax
jne 0x414515
mov ecx, dword [edi + 0xc]
movzx eax, byte [edi + 0x18]
lea edx, [eax - 2]
cmp edx, 0x12
ja case.0x4144e4.5
jmp dword [edx*4 + 0x43c480]
mov eax, 4
jmp case.0x4144e4.2
push str.Unknown_RGB_format_in_framebuffer_init___
call fcn.00410c10
add esp, 4
mov ebx, dword [esp + 4]
jmp 0x414490
mov eax, 3
jmp case.0x4144e4.2
xor eax, eax
imul eax, ecx
mov ebx, dword [esp + 4]
bswap eax
mov dword [esp + 0x20], eax
mov ecx, ebx
mov edx, str.stride
push 4
push esi
call fcn.00402500
add esp, 8
mov ecx, dword [esp + 0x10]
mov esi, dword [ecx + 0xb4]
test esi, esi
je 0x414590
mov dword [ebx + 4], esi
mov edi, dword [esi + 0x20]
mov eax, dword [esi + 0x18]
mov edx, dword [esi + 0x1c]
cmp edi, edx
jb 0x414587
mov ecx, edx
shr ecx, 1
add ecx, edx
mov edi, 2
cmovne edi, ecx
mov dword [esi + 0x1c], edi
shl edi, 2
push edi
push eax
call sub.MSVCR70.dll_realloc
add esp, 8
test edi, edi
je 0x414754
test eax, eax
je 0x41476d
mov dword [esi + 0x18], eax
mov edi, dword [esi + 0x20]
mov ebx, dword [esp + 4]
mov ecx, dword [esp + 0x10]
lea edx, [edi + 1]
mov dword [esi + 0x20], edx
mov dword [eax + edi*4], ebx
mov edx, str.consoletty0
call fcn.0040d5e0
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
test bl, 1
je 0x413f9f
add edi, 4
xor esi, esi
jmp 0x4145c5
cmp bl, 0x3d
je 0x41467c
add edi, 4
dec eax
je 0x414688
mov ecx, dword [edi - 4]
test ecx, ecx
je 0x414688
cmp byte [ecx], 0x2d
jne 0x4145bb
xor edx, edx
cmp byte [ecx + 1], 0x2d
sete dl
lea ebx, [ecx + edx + 1]
mov dword [esp + 0x14], ebx
movzx ebx, byte [ecx + edx + 1]
mov dword [esp + 4], 0
test ebx, ebx
je 0x4145b2
cmp ebx, 0x3d
je 0x4145b2
cmp ebx, 0x67
jne 0x4145bb
mov ebx, dword [esp + 0x14]
movzx ebx, byte [ebx + 1]
test ebx, ebx
mov dword [esp + 4], 1
je 0x4145b2
cmp ebx, 0x3d
je 0x4145b2
cmp ebx, 0x75
jne 0x4145bb
mov ebx, dword [esp + 0x14]
movzx ebx, byte [ebx + 2]
test ebx, ebx
mov dword [esp + 4], 2
je 0x4145b2
cmp ebx, 0x3d
je 0x4145b2
cmp ebx, 0x69
jne 0x4145bb
inc edx
movzx ebx, byte [ecx + edx + 3]
cmp ebx, 0x3d
je 0x41465c
test ebx, ebx
jne 0x4145bb
mov ecx, dword [edi]
mov dword [esp + 4], 3
test ecx, ecx
je 0x4145b2
movzx edx, byte [ecx]
cmp dl, 0x2d
je 0x4145b2
jmp 0x41468d
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 4]
lea esi, [eax + ecx + 1]
movzx edx, byte [esi]
mov ecx, esi
xor eax, eax
test dl, dl
je 0x4146a5
cmp dl, byte [eax + str.win32]
jne 0x4146a7
movzx edx, byte [ecx + eax + 1]
inc eax
test dl, dl
jne 0x414693
xor edx, edx
cmp dl, byte [eax + str.win32]
je 0x413f9f
jmp 0x414114
lea ecx, [esi + 0x80]
mov edx, str.hid_mouse.c_280
call fcn.0040f5ee
jmp 0x413eb8
sub esi, 0xffffff80
mov ecx, esi
call fcn.0040f821
mov ecx, dword [ebp + 8]
jmp 0x413edc
mov ecx, 1
xor eax, eax
lock cmpxchg dword [0x45635c], ecx
jne 0x41473b
xorps xmm0, xmm0
movaps xmmword [esp + 0x30], xmm0
movaps xmmword [esp + 0x40], xmm0
mov dword [esp + 0x50], 0
mov dword [esp + 0x34], 0x42cc80
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [esp + 0x40], eax
mov dword [esp + 0x54], str.RVVM_window
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.USER32.dll_RegisterClassW]
test ax, ax
je 0x41474a
mov dword [0x45635c], 2
mov ecx, 0x45635c
call fcn.00410d70
jmp 0x413fb1
push str.Failed_to_register_window_class_
jmp 0x41410c
push str.Suspicious_0_byte_allocation
mov edi, eax
call fcn.00410c10
mov eax, edi
add esp, 4
test eax, eax
jne 0x414579
push str.Out_of_memory_
call fcn.00410c90
int3