Function at 0x402e70
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2dac
call fcn.00403a70
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
push str.Copyright__c__2012_Advanced_Micro_Devices__Inc.__All_rights_reserved._n
mov dword [ebp - 0x2c88], esi
call dword [sym.imp.MSVCR80.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR80.dll_fprintf]
mov eax, dword [esi + 4]
xor ebx, ebx
add esp, 8
cmp eax, ebx
mov dword [ebp - 0x2cb4], ebx
mov dword [ebp - 0x2ca8], ebx
mov byte [ebp - 0x44], bl
mov dword [ebp - 0x2c98], ebx
mov dword [ebp - 0x2c9c], ebx
je 0x402fe9
cmp byte [eax], 0x2d
jne 0x402fe9
mov edi, 0x406004
mov esi, eax
mov ecx, 3
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x402efd
mov dword [ebp - 0x2cb4], 1
jmp 0x402fc9
mov edi, 0x406000
mov esi, eax
mov ecx, 3
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x402f4d
mov eax, dword [ebp - 0x2c88]
add eax, 4
mov dword [ebp - 0x2c88], eax
mov eax, dword [eax + 4]
cmp eax, ebx
je 0x402fe9
push 0x3f
push eax
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.MSVCR80.dll_strncpy]
mov ecx, dword [ebp - 0x2c88]
add esp, 0xc
add ecx, 4
mov dword [ebp - 0x2c88], ecx
jmp 0x402fd8
mov edi, str._dir
mov esi, eax
mov ecx, 5
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x402f7d
mov eax, dword [ebp - 0x2c88]
add eax, 4
mov dword [ebp - 0x2c88], eax
mov eax, dword [eax + 4]
cmp eax, ebx
je 0x402fe9
mov dword [ebp - 0x2c98], eax
jmp 0x402fc9
mov edi, str._resync
mov esi, eax
mov ecx, 8
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x402f9b
mov dword [ebp - 0x2ca8], 1
jmp 0x402fc9
mov edi, str._check
mov esi, eax
mov ecx, 7
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x403028
mov eax, dword [ebp - 0x2c88]
add eax, 4
mov dword [ebp - 0x2c88], eax
mov eax, dword [eax + 4]
cmp eax, ebx
je 0x402fe9
mov dword [ebp - 0x2c9c], eax
mov eax, dword [ebp - 0x2c88]
add eax, 4
mov dword [ebp - 0x2c88], eax
mov ecx, dword [ebp - 0x2c88]
mov eax, dword [ecx + 4]
cmp eax, ebx
jne 0x402ed3
mov eax, dword [ebp - 0x2c88]
mov eax, dword [eax + 4]
cmp eax, ebx
jne 0x4030fc
push str._nUsage:_kdbsync___v____resync____dir__kdb_directory_____d__device____kdbname__n
call dword [sym.imp.MSVCR80.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR80.dll_fprintf]
add esp, 8
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403a2e
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x2c88]
mov eax, dword [edx + 4]
mov edi, str._check2
mov esi, eax
mov ecx, 8
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4030f4
push 0x3c
lea eax, [ebp - 0x2d68]
push ebx
push eax
mov dword [ebp - 0x2d6c], ebx
call sub.MSVCR80.dll_memset
lea edx, [ebp - 0x2d6c]
lea ecx, [ebp - 0x2c84]
push edx
mov byte [ebp - 0x2c84], bl
mov dword [ebp - 0x2d30], ecx
call fcn.00402c60
add esp, 0x10
cmp eax, ebx
jne 0x4030b6
mov eax, dword [ebp - 0x2d30]
push eax
push str.ERROR:_kdbsdk_get_shared_context___failed___s__n
call dword [sym.imp.MSVCR80.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR80.dll_fprintf]
add esp, 0xc
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403a2e
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x2d60]
mov edx, dword [ebp - 0x2d64]
push ecx
mov ecx, dword [ebp - 0x2d68]
push edx
mov edx, dword [ebp - 0x2d6c]
push ecx
push edx
push eax
push str.kdbsdk_get_shared_context_context:_p_devices:_compute:_p_encode:_p_decode:_p_d3d10:_p__n
call dword [sym.imp.MSVCR80.dll_printf]
add esp, 0x18
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403a2e
mov esp, ebp
pop ebp
ret
push eax
push str._nERROR:_invalid_option__s_n
jmp 0x40308d
push ebx
lea ecx, [ebp - 0x2cbc]
push ecx
push 1
mov dword [0x4071d0], eax
call fcn.00401520
cmp eax, ebx
mov dword [ebp - 0x2c94], eax
je 0x40313d
push eax
push str.ERROR:_clGetPlatformIDs_1__0__failed___d__n
call dword [sym.imp.MSVCR80.dll_printf]
add esp, 8
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403a2e
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x2cbc]
lea eax, [ebp - 0x2c94]
push eax
push ebx
push ebx
push ebx
push 4
lea ecx, [ebp - 0x2d2c]
push ecx
mov dword [ebp - 0x2d2c], 0x1084
mov dword [ebp - 0x2d28], edx
mov dword [ebp - 0x2d24], ebx
mov dword [ebp - 0x2d20], ebx
call fcn.00401780
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0x2cb8], esi
jne 0x4031ac
mov edx, dword [ebp - 0x2c94]
push edx
push str.ERROR:_clCreateContextFromType_CL_DEVICE_TYPE_GPU__failed___d__n
call dword [sym.imp.MSVCR80.dll_printf]
add esp, 8
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403a2e
mov esp, ebp
pop ebp
ret
push ebx
push ebx
lea eax, [ebp - 0x884]
push eax
push 0x402d60
push ebx
push ebx
mov byte [ebp - 0x884], bl
call dword [sym.imp.KERNEL32.dll_CreateThread]
lea ecx, [ebp - 0x2cb0]
push ecx
lea edx, [ebp - 0x2d1c]
push edx
push 0x40
push 0x1081
push esi
mov dword [ebp - 0x2cb0], ebx
call fcn.00401830
cmp eax, ebx
mov dword [ebp - 0x2c94], eax
je 0x403216
push eax
push str.ERROR:_clGetContextInfo___failed___d__n
call dword [sym.imp.MSVCR80.dll_printf]
add esp, 8
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403a2e
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x2cb0]
mov esi, dword [sym.imp.MSVCR80.dll_printf]
shr eax, 2
xor edi, edi
cmp eax, ebx
mov dword [ebp - 0x2cc0], eax
mov dword [ebp - 0x2cac], ebx
mov dword [ebp - 0x2ca0], edi
jle 0x40395a
mov ecx, dword [ebp + edi*4 - 0x2d1c]
push ebx
lea eax, [ebp - 0x84]
push eax
push 0x40
push 0x102b
push ecx
mov byte [ebp - 0x84], bl
call fcn.00401720
cmp eax, ebx
mov dword [ebp - 0x2c94], eax
jne 0x40397b
mov al, byte [ebp - 0x44]
cmp al, 0x23
jne 0x403294
lea edx, [ebp - 0x43]
push edx
call dword [sym.imp.MSVCR80.dll_atoi]
add esp, 4
cmp eax, edi
jne 0x40393d
mov al, byte [ebp - 0x44]
cmp al, 0x23
je 0x4032d4
cmp al, bl
je 0x4032d4
lea edi, [ebp - 0x84]
lea eax, [ebp - 0x44]
mov cl, byte [eax]
cmp cl, byte [edi]
jne 0x4032c1
cmp cl, bl
je 0x4032bd
mov cl, byte [eax + 1]
cmp cl, byte [edi + 1]
jne 0x4032c1
add eax, 2
add edi, 2
cmp cl, bl
jne 0x4032a1
xor eax, eax
jmp 0x4032c6
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
mov edi, dword [ebp - 0x2ca0]
jne 0x40393d
cmp dword [ebp - 0x2cb4], ebx
mov dword [ebp - 0x2cac], 1
je 0x403732
push edi
push str._nOpenCL_Device_Information:__d_n
call esi
mov ecx, dword [ebp + edi*4 - 0x2d1c]
add esp, 8
push ebx
lea eax, [ebp - 0x2884]
push eax
push 0x2000
push 0x102b
push ecx
mov byte [ebp - 0x2884], bl
call fcn.00401720
lea edx, [ebp - 0x2884]
push edx
push str.__DEVICE_NAME______________:__s_n
call esi
mov ecx, dword [ebp + edi*4 - 0x2d1c]
add esp, 8
push ebx
lea eax, [ebp - 0x2c88]
push eax
push 4
push 0x100c
push ecx
mov dword [ebp - 0x2c88], ebx
call fcn.00401720
mov edx, dword [ebp - 0x2c88]
push edx
push str.__MAX_CLOCK_FREQUENCY______:__d_MHz_n
call esi
mov ecx, dword [ebp + edi*4 - 0x2d1c]
add esp, 8
push ebx
lea eax, [ebp - 0x2884]
push eax
push 0x2000
push 0x102c
push ecx
mov byte [ebp - 0x2884], bl
call fcn.00401720
lea edx, [ebp - 0x2884]
push edx
push str.__DEVICE_VENDOR____________:__s_n
call esi
mov ecx, dword [ebp + edi*4 - 0x2d1c]
add esp, 8
push ebx
lea eax, [ebp - 0x2884]
push eax
push 0x2000
push 0x102d
push ecx
mov byte [ebp - 0x2884], bl
call fcn.00401720
lea edx, [ebp - 0x2884]
push edx
push str.__DRIVER_VERSION___________:__s_n
call esi
mov ecx, dword [ebp + edi*4 - 0x2d1c]
add esp, 8
push ebx
lea eax, [ebp - 0x2884]
push eax
push 0x2000
push 0x102f
push ecx
mov byte [ebp - 0x2884], bl
call fcn.00401720
lea edx, [ebp - 0x2884]
push edx
push str.__DEVICE_VERSION___________:__s_n
call esi
mov ecx, dword [ebp + edi*4 - 0x2d1c]
add esp, 8
push ebx
lea eax, [ebp - 0x2c88]
push eax
push 4
mov dword [ebp - 0x2c88], ebx
push 0x1002
push ecx
call fcn.00401720
mov edx, dword [ebp - 0x2c88]
push edx
push str.__MAX_COMPUTE_UNITS________:__d_n
call esi
mov ecx, dword [ebp + edi*4 - 0x2d1c]
add esp, 8
push ebx
lea eax, [ebp - 0x2c88]
push eax
push 4
push 0x1003
push ecx
mov dword [ebp - 0x2c88], ebx
call fcn.00401720
mov edx, dword [ebp - 0x2c88]
push edx
push str.__MAX_WORK_ITEM_DIMENSIONS_:__d_n
call esi
mov ecx, dword [ebp + edi*4 - 0x2d1c]
add esp, 8
push ebx
lea eax, [ebp - 0x2cdc]
push eax
push 0xc
push 0x1005
push ecx
mov dword [ebp - 0x2c88], ebx
call fcn.00401720
mov edx, dword [ebp - 0x2cd4]
mov eax, dword [ebp - 0x2cd8]
mov ecx, dword [ebp - 0x2cdc]
push edx
push eax
push ecx
push str.__MAX_WORK_ITEM_SIZES______:__d__d__d_n
call esi
mov eax, dword [ebp + edi*4 - 0x2d1c]
add esp, 0x10
push ebx
lea edx, [ebp - 0x2c88]
push edx
push 4
push 0x1004
push eax
mov dword [ebp - 0x2c88], ebx
call fcn.00401720
mov ecx, dword [ebp - 0x2c88]
push ecx
push str.__MAX_WORK_GROUP_SIZE______:__d_n
call esi
mov eax, dword [ebp + edi*4 - 0x2d1c]
add esp, 8
push ebx
lea edx, [ebp - 0x2c88]
push edx
push 4
push 0x100d
push eax
mov dword [ebp - 0x2c88], ebx
call fcn.00401720
mov ecx, dword [ebp - 0x2c88]
push ecx
push str.__ADDRESS_BITS_____________:__d_bits_n
call esi
mov eax, dword [ebp + edi*4 - 0x2d1c]
add esp, 8
push ebx
lea edx, [ebp - 0x2c88]
push edx
push 4
push 0x1019
push eax
mov dword [ebp - 0x2c88], ebx
call fcn.00401720
mov ecx, dword [ebp - 0x2c88]
push ecx
push str.__MEM_BASE_ADDR_ALIGN______:__d_bits_n
call esi
add esp, 8
mov eax, dword [ebp + edi*4 - 0x2d1c]
push ebx
lea edx, [ebp - 0x2c90]
push edx
push 8
push 0x1010
push eax
mov dword [ebp - 0x2c90], ebx
mov dword [ebp - 0x2c8c], ebx
call fcn.00401720
mov eax, dword [ebp - 0x2c90]
mov edx, dword [ebp - 0x2c8c]
mov cl, 0x14
call fcn.00403aa0
push eax
push str.__MAX_MEM_ALLOC_SIZE_______:__d_MB_n
call esi
mov edx, dword [ebp + edi*4 - 0x2d1c]
add esp, 8
push ebx
lea ecx, [ebp - 0x2c90]
push ecx
push 8
push 0x101f
push edx
mov dword [ebp - 0x2c90], ebx
mov dword [ebp - 0x2c8c], ebx
call fcn.00401720
mov eax, dword [ebp - 0x2c90]
mov edx, dword [ebp - 0x2c8c]
mov cl, 0x14
call fcn.00403aa0
push eax
push str.__GLOBAL_MEM_SIZE__________:__d_MB_n
call esi
mov ecx, dword [ebp + edi*4 - 0x2d1c]
add esp, 8
push ebx
lea eax, [ebp - 0x2c88]
push eax
push 4
push 0x101c
push ecx
mov dword [ebp - 0x2c88], ebx
call fcn.00401720
mov eax, dword [ebp - 0x2c88]
cmp eax, ebx
jne 0x4035ff
mov eax, str.NONE
jmp 0x40361a
cmp eax, 1
jne 0x40360b
mov eax, str.READ_ONLY
jmp 0x40361a
cmp eax, 2
mov eax, str.READ_WRITE
je 0x40361a
mov eax, str.____
push eax
push str.__GLOBAL_MEM_CACHE_TYPE____:__s_n
call esi
mov eax, dword [ebp + edi*4 - 0x2d1c]
add esp, 8
push ebx
lea edx, [ebp - 0x2c88]
push edx
push 4
push 0x101d
push eax
mov dword [ebp - 0x2c88], ebx
call fcn.00401720
mov ecx, dword [ebp - 0x2c88]
push ecx
push str.__GLOBAL_MEM_CACHELINE_SIZE:__d_bytes_n
call esi
mov eax, dword [ebp + edi*4 - 0x2d1c]
add esp, 8
push ebx
lea edx, [ebp - 0x2c90]
push edx
push 8
push 0x101e
push eax
mov dword [ebp - 0x2c90], ebx
mov dword [ebp - 0x2c8c], ebx
call fcn.00401720
mov eax, dword [ebp - 0x2c90]
mov edx, dword [ebp - 0x2c8c]
mov cl, 0xa
call fcn.00403aa0
push eax
push str.__GLOBAL_MEM_CACHE_SIZE____:__d_KB_n
call esi
mov edx, dword [ebp + edi*4 - 0x2d1c]
add esp, 8
push ebx
lea ecx, [ebp - 0x2c88]
push ecx
push 4
push 0x1022
push edx
mov dword [ebp - 0x2c88], ebx
call fcn.00401720
mov eax, dword [ebp - 0x2c88]
cmp eax, 1
jne 0x4036d2
mov eax, str.LOCAL
jmp 0x4036e1
cmp eax, 2
mov eax, str.GLOBAL
je 0x4036e1
mov eax, str.____
push eax
push str.__LOCAL_MEM_TYPE___________:__s_n
call esi
mov ecx, dword [ebp + edi*4 - 0x2d1c]
add esp, 8
push ebx
lea eax, [ebp - 0x2c90]
push eax
push 8
push 0x1023
push ecx
mov dword [ebp - 0x2c90], ebx
mov dword [ebp - 0x2c8c], ebx
call fcn.00401720
mov eax, dword [ebp - 0x2c90]
mov edx, dword [ebp - 0x2c8c]
mov cl, 0xa
call fcn.00403aa0
push eax
push str.__LOCAL_MEM_SIZE___________:__d_KB_n
call esi
add esp, 8
lea edx, [ebp - 0x84]
push edx
lea eax, [ebp - 0x484]
push str._CHECK__GETINFO__DEVICE_s_
push eax
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0xc
cmp dword [ebp - 0x2c98], ebx
je 0x403788
lea eax, [ebp - 0x484]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x403760
mov ecx, dword [ebp - 0x2c98]
push ecx
sub eax, edx
lea edx, [ebp + eax - 0x484]
push str._DIR_s_
push edx
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0xc
cmp dword [ebp - 0x2ca8], ebx
je 0x4037c1
lea eax, [ebp - 0x484]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x4037a0
sub eax, edx
lea eax, [ebp + eax - 0x484]
push str._RESYNC_
push eax
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 8
push 0x405b20
call esi
push ebx
call dword [sym.imp.MSVCR80.dll__time64]
push 0x34
lea ecx, [ebp - 0x2da8]
push ebx
push ecx
mov dword [0x4071c8], eax
mov dword [0x4071cc], edx
mov dword [ebp - 0x2dac], ebx
call sub.MSVCR80.dll_memset
lea edx, [ebp - 0x484]
mov dword [ebp - 0x2d74], ebx
lea ecx, [ebp - 0x2dac]
mov dword [ebp - 0x2d74], edx
mov edx, dword [ebp - 0x2cb8]
lea eax, [ebp - 0x884]
push ecx
mov dword [ebp - 0x2d70], ebx
mov dword [ebp - 0x2d70], eax
mov eax, dword [0x4071d0]
push edx
push eax
call fcn.00402cc0
add esp, 0x20
cmp eax, ebx
mov dword [ebp - 0x2ca0], eax
je 0x40399a
cmp dword [0x4071c4], ebx
je 0x40384f
mov ecx, dword [0x4071c0]
test ecx, ecx
je 0x403845
mov edx, dword [ebp - 0x2d70]
mov ecx, dword [0x4071d0]
push edx
lea eax, [ebp - 0x84]
push eax
push ecx
push str._nKDB__s:_s__Information:_n_s_n
call esi
mov eax, dword [ebp - 0x2c9c]
add esp, 0x10
cmp eax, ebx
je 0x4038b5
lea edx, [ebp - 0x2cd0]
push edx
push eax
mov eax, dword [ebp - 0x2ca0]
push eax
mov dword [ebp - 0x2cd0], ebx
mov dword [ebp - 0x2ccc], ebx
mov dword [ebp - 0x2cc8], ebx
mov dword [ebp - 0x2cc4], ebx
call fcn.00402d20
add esp, 0xc
cmp eax, ebx
je 0x4039bf
push eax
call fcn.00401ce0
mov ecx, dword [ebp - 0x2ca0]
push ecx
call fcn.00402cf0
add esp, 4
test eax, eax
jl 0x4039f2
push str.OK:_kdbsync_successful
call esi
add esp, 4
cmp dword [0x4071c4], ebx
je 0x403925
push ebx
call dword [sym.imp.MSVCR80.dll__time64]
sub eax, dword [0x4071c8]
mov dword [ebp - 0x2ca0], edx
mov ecx, eax
mov eax, 0x88888889
imul ecx
add edx, ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, eax
shl edx, 4
sub edx, eax
add edx, edx
add edx, edx
mov dword [0x4071c4], ecx
sub ecx, edx
push ecx
push eax
push str._in___d:_02d_
call esi
add esp, 0x10
mov ecx, dword [0x4071d0]
lea eax, [ebp - 0x84]
push eax
push ecx
push str._for__s:_s_n
call esi
add esp, 0xc
add edi, 1
cmp edi, dword [ebp - 0x2cc0]
mov dword [ebp - 0x2ca0], edi
jl 0x403241
cmp dword [ebp - 0x2cac], ebx
jne 0x403968
lea eax, [ebp - 0x44]
push eax
push str._nERROR:_no_device_found_for__s_n
call esi
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403a2e
mov esp, ebp
pop ebp
ret
push eax
push str.ERROR:_clGetDeviceInfo___failed___d__n
call esi
add esp, 8
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403a2e
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x2d70]
push edx
push 0x405a7c
call esi
add esp, 8
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403a2e
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x2cc4]
mov ecx, dword [ebp - 0x2c9c]
mov edx, dword [0x4071d0]
push eax
push ecx
push edx
push str.ERROR:_kdbsdk_get_program__s__s__failed___d__n
call esi
add esp, 0x10
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403a2e
mov esp, ebp
pop ebp
ret
push str.ERROR:_kdbsdk_close___failed_n
call esi
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
xor ecx, ebp
or eax, 0xffffffff
pop ebx
call fcn.00403a2e
mov esp, ebp
pop ebp
ret