Function at 0x402710
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53c466
mov eax, dword fs:[0]
push eax
sub esp, 0x12c
mov eax, dword [0x590a50]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi + 4]
test eax, eax
jne 0x402f35
push eax
lea ecx, [edi + 0x190]
push 0x56910e
mov dword [ebp - 0x12c], ecx
call fcn.00403c90
mov eax, dword [edi + 8]
push eax
push 0
call dword [sym.imp.dtccm2.dll_SetSoftPinPullUp]
push 0x27
lea ecx, [ebp - 0x37]
push 0
push ecx
call fcn.00516ee0
add esp, 0x14
cmp byte [edi + 0x7b], 0
mov ebx, 0x14
mov dword [ebp - 0x34], 0x6050403
mov dword [ebp - 0x30], 0x14090807
mov dword [ebp - 0x2c], 0x140c0b0a
jne 0x4027bb
mov dword [ebp - 0x38], 0x1020014
mov dword [ebp - 0x28], 0xe0f0d14
mov dword [ebp - 0x24], 0x10141213
mov word [ebp - 0x20], 0x1414
jmp 0x4027d6
mov dword [ebp - 0x38], 0x1020010
mov dword [ebp - 0x28], 0x14141414
mov dword [ebp - 0x24], 0xf0e140d
mov word [ebp - 0x20], 0x1312
mov edx, dword [edi + 8]
push edx
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.dtccm2.dll_SetSoftPin]
mov ecx, dword [edi + 8]
push ecx
push 1
call dword [sym.imp.dtccm2.dll_EnableSoftPin]
mov edx, dword [edi + 8]
push edx
push 1
call dword [sym.imp.dtccm2.dll_EnableGpio]
mov eax, dword [edi + 8]
movzx ecx, byte [edi + 0x15]
push eax
push 1
push ecx
call dword [sym.imp.dtccm2.dll_SensorEnable]
add esp, 0x24
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
fld dword [edi + 0x170]
mov dword [ebp - 0x9c], 0
fld qword [0x56b0b8]
fmul st(1), st(0)
fxch st(1)
call fcn.0051a5d0
fld dword [edi + 0x174]
mov dword [ebp - 0xec], eax
fmul st(1)
mov eax, 1
mov esi, 0x12c
mov dword [ebp - 0xc4], esi
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x98], eax
call fcn.0051a5d0
fld dword [edi + 0x178]
fmul st(1)
mov dword [ebp - 0xe8], eax
mov dword [ebp - 0xc0], esi
mov dword [ebp - 0x5c], 1
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x94], 2
call fcn.0051a5d0
fmul dword [edi + 0x17c]
mov dword [ebp - 0xe4], eax
mov dword [ebp - 0xbc], esi
mov dword [ebp - 0x58], 1
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x90], 3
call fcn.0051a5d0
mov edx, dword [edi + 8]
mov dword [ebp - 0xe0], eax
xor eax, eax
push edx
mov ecx, 1
mov dword [ebp - 0x68], eax
mov dword [ebp - 0xdc], eax
mov dword [ebp - 0x64], eax
push 5
lea eax, [ebp - 0x114]
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x50], ecx
push eax
lea ecx, [ebp - 0x9c]
push ecx
mov dword [ebp - 0xb8], esi
mov dword [ebp - 0x8c], 4
mov dword [ebp - 0xb4], esi
mov dword [ebp - 0x114], esi
mov dword [ebp - 0x110], esi
mov dword [ebp - 0x10c], esi
mov dword [ebp - 0x108], esi
mov dword [ebp - 0x104], esi
call dword [sym.imp.dtccm2.dll_PmuSetOcpCurrentLimit]
mov edx, dword [edi + 8]
push edx
push 5
lea eax, [ebp - 0xec]
push eax
lea ecx, [ebp - 0x9c]
push ecx
call dword [sym.imp.dtccm2.dll_PmuSetVoltage]
add esp, 0x20
cmp eax, 1
je 0x402971
push 0
push 0
push str.Set_Voltage_Failed_
call fcn.0041774d
xor eax, eax
jmp 0x4032e4
mov edx, dword [edi + 8]
push edx
call dword [sym.imp.dtccm2.dll_GetKitType]
xor ecx, ecx
mov esi, 1
add esp, 4
mov dword [ebp - 0x118], eax
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x54], esi
cmp eax, 0x10
je 0x402a23
mov eax, dword [edi + 8]
push eax
push 5
lea ecx, [ebp - 0x60]
push ecx
lea edx, [ebp - 0x9c]
push edx
call dword [sym.imp.dtccm2.dll_PmuSetOnOff]
add esp, 0x10
cmp eax, esi
je 0x4029cc
push 0
push 0
push str.Open_Voltage_Failed_
call fcn.0041774d
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x64
call esi
cmp dword [ebp - 0x118], 0x10
mov eax, 1
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], eax
je 0x402a2f
mov eax, dword [edi + 8]
push eax
push 5
lea ecx, [ebp - 0x60]
push ecx
lea edx, [ebp - 0x9c]
push edx
call dword [sym.imp.dtccm2.dll_PmuSetOnOff]
add esp, 0x10
cmp eax, 1
je 0x402a33
push 0
push 0
push str.Open_Voltage_Failed_
call fcn.0041774d
jmp 0x402a33
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0xa
call esi
jmp 0x4029d2
push 0xa
call esi
push 0x64
call esi
cmp dword [ebp - 0x118], 0x10
mov eax, 1
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
je 0x402ab4
mov eax, dword [edi + 8]
push eax
push 5
lea ecx, [ebp - 0x60]
push ecx
lea edx, [ebp - 0x9c]
push edx
call dword [sym.imp.dtccm2.dll_PmuSetOnOff]
add esp, 0x10
cmp eax, 1
je 0x402a7e
push 0
push 0
push str.Open_Voltage_Failed_
call fcn.0041774d
mov eax, dword [edi + 8]
push eax
push 5
lea ecx, [ebp - 0x74]
push ecx
lea edx, [ebp - 0x9c]
push edx
call dword [sym.imp.dtccm2.dll_PmuSetCurrentRange]
mov eax, dword [edi + 8]
push eax
push 5
lea ecx, [ebp - 0xc4]
push ecx
lea edx, [ebp - 0x9c]
push edx
call dword [sym.imp.dtccm2.dll_PmuSetOcpCurrentLimit]
add esp, 0x20
jmp 0x402ab8
push 0xa
call esi
mov eax, dword [edi + 8]
fild dword [edi + 0x74]
push eax
fnstcw word [ebp - 0x11a]
movzx eax, word [ebp - 0x11a]
fstp dword [ebp - 0x124]
fld dword [ebp - 0x124]
or eax, 0xc00
fmul qword [0x56b0e0]
mov dword [ebp - 0x124], eax
fldcw word [ebp - 0x124]
fistp dword [ebp - 0x124]
mov cx, word [ebp - 0x124]
movzx edx, cx
push edx
fldcw word [ebp - 0x11a]
push 1
call dword [sym.imp.dtccm2.dll_SetSensorClock]
add esp, 0xc
cmp eax, 1
je 0x402b2b
push 0
push 0
push str.Set_Mclk_Failed_
call fcn.0041774d
xor eax, eax
jmp 0x4032e4
mov eax, dword [edi + 8]
push eax
push 1
call dword [sym.imp.dtccm2.dll_SetSoftPinPullUp]
mov ecx, dword [edi + 8]
push ecx
push 0
call dword [sym.imp.dtccm2.dll_SetSensorI2cRate]
mov edx, dword [edi + 8]
push edx
push 0
call dword [sym.imp.dtccm2.dll_SetSensorI2cRapid]
mov eax, dword [edi + 8]
push eax
push 0
call dword [sym.imp.dtccm2.dll_SetI2CInterval]
mov ecx, dword [edi + 8]
movzx edx, byte [edi + 0x15]
push ecx
push 1
push edx
call dword [sym.imp.dtccm2.dll_SensorEnable]
mov cl, byte [edi + 0x15]
mov eax, dword [edi + 8]
xor cl, 2
push eax
movzx edx, cl
push 1
push edx
call dword [sym.imp.dtccm2.dll_SensorEnable]
add esp, 0x38
push ebx
call esi
mov eax, dword [edi + 8]
movzx ecx, byte [edi + 0x15]
push eax
push 1
push ecx
call dword [sym.imp.dtccm2.dll_SensorEnable]
add esp, 0xc
push 0x1e
call esi
mov edx, dword [edi + 8]
push edx
push 0
lea eax, [edi + 0x10]
push 1
push eax
call dword [sym.imp.dtccm2.dll_SensorIsMe]
add esp, 0x10
cmp eax, 1
je 0x402bd3
cmp dword [edi + 0xb50], 1
jne 0x402bd3
mov ecx, dword [ebp - 0x12c]
push str.Find_Sensor_Failed_
call fcn.00403d70
call fcn.00418883
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x402bed
push 0x80004005
call fcn.00401580
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x118], eax
xor esi, esi
xor ecx, ecx
mov dword [ebp - 4], esi
cmp cx, word [edi + 0x68]
jae 0x402da9
mov edx, dword [edi + 0x64]
movzx ecx, word [edx + esi*2]
lea eax, [edx + esi*2]
mov edx, 0xffff
cmp cx, dx
je 0x402d8f
mov edx, 0xff
cmp cx, dx
je 0x402d8f
movzx edx, byte [edi + 0x17]
movzx eax, word [eax + 2]
push 0
push edx
push eax
push ecx
movzx ecx, byte [edi + 0x16]
push ecx
call dword [sym.imp.dtccm2.dll_WriteSensorReg]
add esp, 0x14
cmp esi, 3
jle 0x402d9a
cmp dword [edi + 0xb50], 1
jne 0x402d9a
mov edx, dword [edi + 0x64]
movzx ecx, byte [edi + 0x17]
lea eax, [edx + esi*2]
movzx edx, word [eax + 2]
movzx eax, word [eax]
push 0
push ecx
movzx ecx, byte [edi + 0x16]
push edx
push eax
push ecx
call dword [sym.imp.dtccm2.dll_WriteSensorReg]
movzx edx, byte [edi + 0x17]
mov ecx, dword [edi + 0x64]
xor ebx, ebx
push ebx
push edx
movzx edx, word [ecx + esi*2]
lea eax, [ebp - 0x11c]
push eax
movzx eax, byte [edi + 0x16]
push edx
push eax
call dword [sym.imp.dtccm2.dll_ReadSensorReg]
mov ecx, dword [edi + 0x64]
mov ax, word [ebp - 0x11c]
add esp, 0x28
cmp ax, word [ecx + esi*2 + 2]
je 0x402d2a
mov edi, edi
cmp ebx, 0xc8
jge 0x402d2a
mov edx, dword [edi + 0x64]
movzx ecx, byte [edi + 0x17]
lea eax, [edx + esi*2]
movzx edx, word [eax + 2]
movzx eax, word [eax]
push 0
push ecx
movzx ecx, byte [edi + 0x16]
push edx
push eax
push ecx
call dword [sym.imp.dtccm2.dll_WriteSensorReg]
add esp, 0x14
push 5
call dword [sym.imp.KERNEL32.dll_Sleep]
movzx edx, byte [edi + 0x17]
mov ecx, dword [edi + 0x64]
push 0
push edx
movzx edx, word [ecx + esi*2]
lea eax, [ebp - 0x11c]
push eax
movzx eax, byte [edi + 0x16]
push edx
push eax
call dword [sym.imp.dtccm2.dll_ReadSensorReg]
mov ecx, dword [edi + 0x64]
mov ax, word [ebp - 0x11c]
add esp, 0x14
inc ebx
cmp ax, word [ecx + esi*2 + 2]
jne 0x402cc0
mov edx, dword [edi + 0x64]
cmp ax, word [edx + esi*2 + 2]
je 0x402d9a
movzx eax, word [edx + esi*2]
push eax
lea ecx, [ebp - 0x118]
push str.0x_x
push ecx
call fcn.00401650
mov esi, dword [ebp - 0x12c]
add esp, 0xc
push str.Init_Sensor_Failed_
mov ecx, esi
call fcn.00403d70
push 0x56910c
mov ecx, esi
call fcn.004039c0
mov eax, dword [ebp - 0x118]
mov edx, dword [eax - 0xc]
push edx
push eax
mov ecx, esi
call fcn.004038c0
lea ecx, [ebp - 0x118]
call fcn.004013d0
xor eax, eax
jmp 0x4032e4
movzx eax, word [eax + 2]
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
movzx ecx, word [edi + 0x68]
add esi, 2
cmp esi, ecx
jl 0x402c10
lea ecx, [ebp - 0x118]
call fcn.004013d0
mov eax, dword [edi + 8]
push eax
push 2
lea ecx, [ebp - 0x128]
push ecx
push 0x80
xor esi, esi
push 0xba
mov dword [ebp - 0x128], esi
call dword [sym.imp.dtccm2.dll_ReadSensorReg]
mov edx, 0x5150
add esp, 0x14
cmp word [ebp - 0x128], dx
jne 0x402def
mov esi, 1
mov al, byte [edi + 0x14]
cmp al, 2
je 0x402e0f
cmp al, 5
je 0x402e0f
cmp al, 8
je 0x402e0f
mov eax, dword [edi + 8]
movzx ecx, byte [edi + 0x72]
push eax
push ecx
call dword [sym.imp.dtccm2.dll_SetRawFormat]
jmp 0x402e1e
mov edx, dword [edi + 8]
movzx eax, byte [edi + 0x72]
push edx
push eax
call dword [sym.imp.dtccm2.dll_SetYUV422Format]
mov ecx, dword [edi + 8]
movzx edx, word [edi + 0x12]
movzx eax, word [edi + 0x10]
add esp, 8
push ecx
movzx ecx, byte [edi + 0x7b]
push edx
push eax
push ecx
call dword [sym.imp.dtccm2.dll_SetSensorPort]
movzx eax, word [edi + 0x12]
add esp, 0x10
test esi, esi
je 0x402e47
shr eax, 1
mov edx, dword [edi + 8]
movzx ecx, byte [edi + 0x14]
push edx
movzx edx, word [edi + 0x10]
push 1
push ecx
push 1
push 1
push 0
push 0
push eax
push edx
push 0
push 0
call dword [sym.imp.dtccm2.dll_InitRoi]
mov eax, dword [edi + 8]
push eax
push 0
call dword [sym.imp.dtccm2.dll_SetMipiClkPhase]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 0x34
push 0xa
call ebx
mov ecx, dword [edi + 8]
push ecx
lea esi, [edi + 0xc]
push esi
call dword [sym.imp.dtccm2.dll_CalculateGrabSize]
mov edx, dword [edi + 8]
mov eax, dword [esi]
push edx
push eax
call dword [sym.imp.dtccm2.dll_OpenVideo]
mov eax, dword [edi]
add esp, 0x10
test eax, eax
je 0x402eaa
mov eax, dword [eax + 0x20]
mov ecx, dword [edi + 8]
movzx edx, word [edi + 0x12]
push ecx
movzx ecx, word [edi + 0x10]
push 0
push 1
push 0
push edx
push ecx
push eax
call dword [sym.imp.dtccm2.dll_InitDisplay]
add esp, 0x1c
push 0x64
call ebx
mov edx, dword [edi + 8]
movzx eax, word [edi + 0x12]
movzx ecx, word [edi + 0x10]
push edx
push 1
push 0
push eax
push ecx
call dword [sym.imp.dtccm2.dll_InitIsp]
add esp, 0x14
push 0x64
call ebx
mov edx, dword [edi + 8]
push edx
push 0x64
call dword [sym.imp.dtccm2.dll_SetGamma]
push 0
push 0x64
call dword [sym.imp.dtccm2.dll_SetContrast]
mov eax, dword [edi + 8]
push eax
push 0x80
call dword [sym.imp.dtccm2.dll_SetSaturation]
fld1
mov ecx, dword [edi + 8]
add esp, 0x18
push ecx
sub esp, 0xc
fst dword [esp + 8]
fst dword [esp + 4]
fstp dword [esp]
call dword [sym.imp.dtccm2.dll_SetDigitalGain]
add esp, 0x10
jmp 0x4032df
cmp eax, 1
jne 0x4032d1
call fcn.004023c0
mov bx, word [edi + 0x12]
push 1
call fcn.004033c0
cmp byte [edi + 0x14], 2
push 2
jne 0x402f5f
movzx ebx, word [edi + 0x10]
add bx, bx
jmp 0x402f63
mov bx, word [edi + 0x10]
call fcn.004033c0
call fcn.00418883
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x402f82
push 0x80004005
call fcn.00401580
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x118], eax
mov dword [ebp - 4], 1
xor esi, esi
xor ecx, ecx
mov dword [ebp - 0x11c], esi
cmp cx, word [edi + 0x68]
jae 0x4031f2
nop
mov edx, dword [edi + 0x64]
movzx ecx, word [edx + esi*2]
lea eax, [edx + esi*2]
mov edx, 0xffff
cmp cx, dx
je 0x4031d2
mov edx, 0xff
cmp cx, dx
je 0x4031d2
movzx ebx, word [eax + 2]
mov dl, byte [edi + 0x17]
mov eax, ecx
mov cl, byte [edi + 0x16]
mov byte [ebp - 0x128], cl
mov ecx, dword [edi + 4]
mov byte [ebp - 0x138], dl
test ecx, ecx
jne 0x403014
mov edx, dword [edi + 8]
mov ecx, dword [ebp - 0x138]
push edx
mov edx, dword [ebp - 0x128]
push ecx
push ebx
push eax
push edx
call dword [sym.imp.dtccm2.dll_WriteSensorReg]
add esp, 0x14
jmp 0x403029
cmp ecx, 1
jne 0x40302e
push ecx
push 2
push eax
mov eax, dword [ebp - 0x128]
push eax
call fcn.004034e0
cmp eax, 1
je 0x403098
movzx ecx, byte [edi + 0x17]
mov edx, dword [edi + 0x64]
movzx ebx, word [edx + esi*2 + 2]
mov byte [ebp - 0x130], cl
movzx ecx, byte [edi + 0x16]
lea eax, [edx + esi*2]
movzx eax, word [eax]
mov byte [ebp - 0x12c], cl
mov ecx, dword [edi + 4]
test ecx, ecx
jne 0x403076
mov edx, dword [edi + 8]
mov ecx, dword [ebp - 0x130]
push edx
mov edx, dword [ebp - 0x12c]
push ecx
push ebx
push eax
push edx
call dword [sym.imp.dtccm2.dll_WriteSensorReg]
add esp, 0x14
jmp 0x40308f
cmp ecx, 1
jne 0x40325a
push ecx
push 2
push eax
mov eax, dword [ebp - 0x12c]
push eax
call fcn.004034e0
cmp eax, 1
jne 0x40325a
mov al, byte [edi + 0x16]
mov cl, byte [edi + 0x17]
mov edx, dword [edi + 0x64]
mov byte [ebp - 0x124], al
mov eax, dword [edi + 4]
mov byte [ebp - 0x134], cl
movzx ecx, word [edx + esi*2]
test eax, eax
jne 0x4030dd
mov edx, dword [edi + 8]
mov eax, dword [ebp - 0x134]
push edx
push eax
mov eax, dword [ebp - 0x124]
lea edx, [ebp - 0x120]
push edx
push ecx
push eax
call dword [sym.imp.dtccm2.dll_ReadSensorReg]
add esp, 0x14
jmp 0x4030fd
cmp eax, 1
jne 0x4030fd
push eax
mov eax, dword [ebp - 0x124]
lea edx, [ebp - 0x120]
push edx
push eax
mov eax, 2
mov edx, edi
call fcn.00403610
mov ecx, dword [edi + 0x64]
mov dx, word [ebp - 0x120]
cmp dx, word [ecx + esi*2 + 2]
je 0x4031dd
cmp esi, 3
jle 0x4031dd
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x32
call ebx
movzx edx, byte [edi + 0x17]
mov eax, dword [edi + 0x64]
lea ecx, [eax + esi*2]
mov ax, word [ecx + 2]
mov cx, word [ecx]
push edx
mov dl, byte [edi + 0x16]
push edi
call fcn.004035c0
push 0xa
call ebx
movzx eax, byte [edi + 0x17]
movzx edx, byte [edi + 0x16]
mov ecx, dword [edi + 0x64]
mov ebx, dword [ebp - 0x11c]
mov cx, word [ecx + ebx*2]
push eax
push edx
lea esi, [ebp - 0x120]
mov edx, edi
call fcn.004036f0
mov eax, dword [edi + 0x64]
movzx ecx, word [ebp - 0x120]
cmp cx, word [eax + ebx*2 + 2]
lea eax, [eax + ebx*2]
je 0x4031ca
movzx edx, word [eax]
push edx
lea eax, [ebp - 0x118]
push str.0x_x
push eax
call fcn.00401650
add esp, 0xc
push str.Init_Sensor_Failed_
lea ecx, [edi + 0x190]
call fcn.00403d70
push 0x56910c
lea ecx, [edi + 0x190]
call fcn.004039c0
mov ecx, dword [ebp - 0x118]
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [edi + 0x190]
call fcn.004038c0
mov esi, dword [ebp - 0x11c]
jmp 0x4031dd
movzx ecx, word [eax + 2]
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
movzx edx, word [edi + 0x68]
add esi, 2
mov dword [ebp - 0x11c], esi
cmp esi, edx
jl 0x402fb0
movzx ecx, word [edi + 0x10]
movzx eax, word [edi + 0x12]
imul eax, ecx
mov cl, byte [edi + 0x14]
mov dword [edi + 0xc], eax
cmp cl, 2
je 0x40321b
cmp cl, 3
je 0x40321b
cmp cl, 6
je 0x40321b
cmp cl, 7
je 0x40321b
test cl, cl
jne 0x403221
lea edx, [eax + eax]
mov dword [edi + 0xc], edx
mov esi, edi
call fcn.00402040
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x118]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4032df
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x4032df
mov eax, dword [edi + 0x64]
movzx ecx, word [eax + esi*2]
push ecx
lea edx, [ebp - 0x118]
push str.0x_x
push edx
call fcn.00401650
add esp, 0xc
push 0x13
lea esi, [edi + 0x190]
push str.Init_Sensor_Failed_
mov ecx, esi
call fcn.00403c90
push 1
push 0x56910c
mov ecx, esi
call fcn.004038c0
mov edi, dword [ebp - 0x118]
mov eax, dword [edi - 0xc]
push eax
push edi
mov ecx, esi
call fcn.004038c0
lea eax, [edi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4032cd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x4032e4
movzx ecx, word [edi + 0x12]
movzx edx, word [edi + 0x10]
imul ecx, edx
mov dword [edi + 0xc], ecx
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00514add
mov esp, ebp
pop ebp
ret