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

Disassembly:
sub esp, 0x90
mov edx, dword [0x43f7b8]
mov eax, dword [0x43f7b0]
mov ecx, dword [0x43f7b4]
push ebx
mov dword [esp + 0x7c], edx
mov edx, dword [0x43f7c4]
push esi
mov dword [esp + 0x78], eax
mov eax, dword [0x43f7bc]
mov dword [esp + 0x7c], ecx
mov ecx, dword [0x43f7c0]
xor ebx, ebx
push edi
mov dword [esp + 0x90], edx
mov edx, dword [esp + 0xa0]
push ebx
mov dword [esp + 0x8c], eax
mov eax, dword [0x43f7c8]
mov dword [esp + 0x90], ecx
mov ecx, dword [0x43f7cc]
push 0x5196b4
push 0x500
push edx
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], ecx
call sub.DINPUT.dll_DirectInputCreateA
cmp eax, ebx
je 0x42cd1a
mov ecx, eax
and ecx, 0xffff
push ecx
push eax
push str.cant_initialise_mouse__step_1__x__d
call fcn.0042ebf0
add esp, 0xc
mov eax, dword [0x5196b4]
push ebx
lea ecx, [esp + 0x80]
push 0x5196bc
mov edx, dword [eax]
push ecx
push eax
call dword [edx + 0xc]
cmp eax, ebx
je 0x42cd4e
mov edx, eax
and edx, 0xffff
push edx
push eax
push str.cant_initialise_mouse__step_2__x__d
call fcn.0042ebf0
add esp, 0xc
mov eax, dword [0x5196bc]
push 0x43d740
push eax
mov ecx, dword [eax]
call dword [ecx + 0x2c]
cmp eax, ebx
je 0x42cd79
mov edx, eax
and edx, 0xffff
push edx
push eax
push str.cant_initialise_mouse__step_3__x__d
call fcn.0042ebf0
add esp, 0xc
mov eax, dword [0x5196bc]
mov esi, dword [esp + 0xa4]
push 6
push esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x34]
cmp eax, ebx
je 0x42cda9
mov edx, eax
and edx, 0xffff
push edx
push eax
push str.cant_initialise_mouse__step_4__x__d
call fcn.0042ebf0
add esp, 0xc
mov eax, dword [0x5196bc]
push 0x481c38
push 1
push eax
mov ecx, dword [eax]
call dword [ecx + 0x18]
cmp eax, ebx
je 0x42cdd6
mov edx, eax
and edx, 0xffff
push edx
push eax
push str.cant_initialise_mouse__step_5__x__d
call fcn.0042ebf0
add esp, 0xc
mov eax, dword [0x5196bc]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
cmp eax, ebx
je 0x42cdfc
mov edx, eax
and edx, 0xffff
push edx
push eax
push str.cant_initialise_mouse__step_6__x__d
call fcn.0042ebf0
add esp, 0xc
mov eax, dword [0x5196b4]
push ebx
lea edx, [esp + 0x90]
push 0x5196b8
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0xc]
cmp eax, ebx
je 0x42ce30
mov ecx, eax
and ecx, 0xffff
push ecx
push eax
push str.cant_initialise_keyboard__step_1__x__d
call fcn.0042ebf0
add esp, 0xc
mov eax, dword [0x5196b8]
push 0x43d6b0
push eax
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp eax, ebx
je 0x42ce5b
mov ecx, eax
and ecx, 0xffff
push ecx
push eax
push str.cant_initialise_keyboard__step_2__x__d
call fcn.0042ebf0
add esp, 0xc
mov eax, dword [0x5196b8]
push 6
push esi
push eax
mov edx, dword [eax]
call dword [edx + 0x34]
cmp eax, ebx
je 0x42ce84
mov ecx, eax
and ecx, 0xffff
push ecx
push eax
push str.cant_initialise_keyboard__step_3__x__d
call fcn.0042ebf0
add esp, 0xc
mov eax, dword [0x5196b8]
push 0x481c50
push 1
push eax
mov edx, dword [eax]
call dword [edx + 0x18]
cmp eax, ebx
je 0x42ceb1
mov ecx, eax
and ecx, 0xffff
push ecx
push eax
push str.cant_initialise_keyboard__step_4__x__d
call fcn.0042ebf0
add esp, 0xc
mov eax, dword [0x5196b8]
push eax
mov edx, dword [eax]
call dword [edx + 0x1c]
cmp eax, ebx
je 0x42ced7
mov ecx, eax
and ecx, 0xffff
push ecx
push eax
push str.cant_initialise_keyboard__step_5__x__d
call fcn.0042ebf0
add esp, 0xc
mov ecx, 0x40
xor eax, eax
mov edi, 0x8fd680
mov dword [0x5196c4], ebx
rep stosd dword es:[edi], eax
mov ecx, 0x40
mov edi, 0x8fd780
rep stosd dword es:[edi], eax
mov eax, 8
dec eax
mov dword [0x8d83e0], ebx
jne 0x42cefc
mov eax, dword [0x5196b4]
push 1
push eax
push 0x42cbb0
mov edx, dword [eax]
push 4
push eax
call dword [edx + 0x10]
test eax, eax
je 0x42cf2b
push str.cant_enumerate_joysticks
call fcn.0042ebf0
add esp, 4
mov eax, dword [0x5196c4]
xor edi, edi
cmp eax, ebx
mov dword [esp + 0xc], edi
jbe 0x42d218
push ebp
mov esi, 0x8d83e4
mov ebp, 0x2710
jmp 0x42cf4f
mov edi, dword [esp + 0x10]
mov eax, dword [esi - 4]
push 0x43c690
push eax
mov ecx, dword [eax]
call dword [ecx + 0x2c]
cmp eax, ebx
je 0x42cf79
mov edx, eax
and edx, 0xffff
push edx
push eax
push edi
push str.Error:_SetDataFormat_failed_on_joystick__d__x__d
call fcn.0042ebf0
add esp, 0x10
mov eax, dword [esi - 4]
mov edx, dword [0x8b5504]
push 5
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x34]
cmp eax, ebx
je 0x42cfa7
mov ecx, eax
and ecx, 0xffff
push ecx
push eax
push edi
push str.Error:_SetCooperativeLevel_failed_on_joystick__d__x__d
call fcn.0042ebf0
add esp, 0x10
mov eax, dword [esi - 4]
push eax
mov edx, dword [eax]
call dword [edx + 0x1c]
cmp eax, ebx
je 0x42cfcc
mov ecx, eax
and ecx, 0xffff
push ecx
push eax
push edi
push str.Error:_Acquire_failed_on_joystick__d__x__d
call fcn.0042ebf0
add esp, 0x10
mov ecx, 0xb
xor eax, eax
mov edi, esi
push esi
rep stosd dword es:[edi], eax
mov dword [esi], 0x2c
mov eax, dword [esi - 4]
push eax
mov edx, dword [eax]
call dword [edx + 0xc]
cmp eax, ebx
je 0x42d007
mov edx, dword [esp + 0x10]
mov ecx, eax
and ecx, 0xffff
push ecx
push eax
push edx
push str.Error:_GetCapabilities_failed_on_joystick__d__x__d
call fcn.0042ebf0
add esp, 0x10
mov al, byte [esi + 0xc]
cmp al, 6
mov byte [esi + 0x2d], al
jbe 0x42d015
mov byte [esi + 0x2d], 6
mov cl, byte [esi + 0x2d]
xor edi, edi
cmp cl, bl
mov eax, 1
jbe 0x42d037
mov ecx, dword [esi + 0x34]
or ecx, eax
mov dword [esi + 0x34], ecx
xor ecx, ecx
mov cl, byte [esi + 0x2d]
shl eax, 1
inc edi
cmp edi, ecx
jb 0x42d023
mov al, byte [esi + 0x10]
cmp al, 0x10
mov byte [esi + 0x2e], al
jbe 0x42d045
mov byte [esi + 0x2e], 0x10
mov al, byte [esi + 0x14]
cmp al, 1
mov byte [esi + 0x2f], al
jbe 0x42d053
mov byte [esi + 0x2e], 1
mov edx, dword [esi + 4]
shr edx, 1
and dl, 1
mov byte [esi + 0x2c], dl
mov eax, dword [esi + 4]
shr eax, 8
and al, 1
mov byte [esi + 0x30], al
je 0x42d1fa
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0x50]
mov dword [esp + 0x4c], 0x34
rep stosd dword es:[edi], eax
mov eax, 0x1388
lea edi, [esi + 0x4a40]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x24]
lea ecx, [esp + 0x24]
mov dword [esp + 0x6c], eax
mov eax, dword [esi - 4]
lea edx, [esp + 0x34]
push ebx
push edi
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x48], ebp
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x50], ebx
mov dword [esp + 0x1c], 0x1194
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], 2
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x58], 0x12
mov dword [esp + 0x5c], 0xffffffff
mov dword [esp + 0x64], ebp
mov dword [esp + 0x70], 1
mov dword [esp + 0x78], ecx
mov dword [esp + 0x80], 0x18
mov dword [esp + 0x84], edx
mov ecx, dword [eax]
push ebx
push 0x43f850
push eax
call dword [ecx + 0x48]
test eax, eax
jne 0x42d138
mov edi, dword [edi]
lea eax, [esp + 0x4c]
push 0x20000165
push eax
mov edx, dword [edi]
push edi
call dword [edx + 0x18]
mov eax, 0x3e8
lea edi, [esi + 0x4a44]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], eax
mov eax, dword [esi - 4]
push ebx
push edi
push ebx
mov ecx, dword [eax]
push 0x43f880
push eax
call dword [ecx + 0x48]
mov edi, dword [edi]
lea eax, [esp + 0x4c]
push 0x20000165
push eax
mov edx, dword [edi]
push edi
call dword [edx + 0x18]
mov eax, dword [esi - 4]
lea edi, [esi + 0x4a48]
lea ecx, [esp + 0x14]
push ebx
push edi
mov dword [esp + 0x80], 0x10
mov dword [esp + 0x84], ecx
mov edx, dword [eax]
push ebx
push 0x43f820
push eax
call dword [edx + 0x48]
test eax, eax
jne 0x42d1b1
mov edi, dword [edi]
lea ecx, [esp + 0x4c]
push 0x165
push ecx
mov eax, dword [edi]
push edi
call dword [eax + 0x18]
mov eax, dword [esi - 4]
lea edi, [esi + 0x4a4c]
push ebx
push edi
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], 0x3d090
mov dword [esp + 0x5c], 0x7a120
mov edx, dword [eax]
push ebx
push 0x43f800
push eax
call dword [edx + 0x48]
test eax, eax
jne 0x42d1fa
mov edi, dword [edi]
lea ecx, [esp + 0x4c]
push 0x165
push ecx
mov eax, dword [edi]
push edi
call dword [eax + 0x18]
mov eax, dword [esp + 0x10]
mov ecx, dword [0x5196c4]
inc eax
add esi, 0x4a54
cmp eax, ecx
mov dword [esp + 0x10], eax
jb 0x42cf4b
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x90
ret